Add training examples for DetConS based on Efficient Visual Pretraining with Contrastive Detection.
The transform (DetConSTransform), loss (DetConSLoss), and a masked pooling utility (pool_masked in lightly/models/utils.py) are already implemented. The forward pass retains spatial backbone feature maps, pools them per mask region, and passes the resulting (B, M, D) embeddings to DetConSLoss. For the example, the built-in spatial grid heuristic (DetConSTransform(grid_size=(5, 5))) avoids any external segmentation dependency — the paper shows a 5×5 grid is optimal.
Tasks
Follow examples/pytorch/densecl.py as the structural template. I'd like to take this on.
Add training examples for DetConS based on Efficient Visual Pretraining with Contrastive Detection.
The transform (
DetConSTransform), loss (DetConSLoss), and a masked pooling utility (pool_maskedinlightly/models/utils.py) are already implemented. The forward pass retains spatial backbone feature maps, pools them per mask region, and passes the resulting(B, M, D)embeddings toDetConSLoss. For the example, the built-in spatial grid heuristic (DetConSTransform(grid_size=(5, 5))) avoids any external segmentation dependency — the paper shows a 5×5 grid is optimal.Tasks
examples/pytorch/detcon.pyexamples/pytorch_lightning/detcon.pyexamples/pytorch_lightning_distributed/detcon.pyFollow
examples/pytorch/densecl.pyas the structural template. I'd like to take this on.