An unofficial PyTorch implementation of DetCo paper. Official implementation can be found here.
This implementation is based on the official implementation of MoCo and PyTorch resnet code. Though list is mentioned in original paper, this implementation use pure tensors without list, which enables parallel computing.
pip install -r requirements.txt
- Please refer to main_decto.py:
As specified in the original paper, DetCo is trained with 8 GPUs with batch shuffling. However, sometimes you cannot use all the GPUs in an 8-GPU machine. I used half of them for training. If you also need to modify the number of GPUs like me, check the following two lines of code:
This implementation reserved original moco implementation as much as possible. Therefore the command line for unsupervised training is also similar to that of moco. You can train like:
-
python main_detco.py \ -a resnet50 \ --lr 0.015 \ --batch-size 128 \ --dist-url 'tcp://localhost:10001' --multiprocessing-distributed --world-size 1 --rank 0 \ [your imagenet-folder with train and val folders] \ --detco-t 0.2 --aug-plus --cos
- object detection training & performance checking on certain datasets