Skip to content

Latest commit

 

History

History

detection

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

MoCo: Transferring to Detection

The train_net.py script reproduces the object detection experiments on Pascal VOC and COCO.

Instruction

  1. Install detectron2.

  2. Convert a pre-trained MoCo model to detectron2's format:

    python3 convert-pretrain-to-detectron2.py input.pth.tar output.pkl
    
  3. Put dataset under "./datasets" directory, following the directory structure requried by detectron2.

  4. Run training:

    python train_net.py --config-file configs/pascal_voc_R_50_C4_24k_moco.yaml \
     --num-gpus 8 MODEL.WEIGHTS ./output.pkl
    

Results

Below are the results on Pascal VOC 2007 test, fine-tuned on 2007+2012 trainval for 24k iterations using Faster R-CNN with a R50-C4 backbone:

pretrain AP50 AP AP75
ImageNet-1M, supervised 81.3 53.5 58.8
ImageNet-1M, MoCo v1, 200ep 81.5 55.9 62.6
ImageNet-1M, MoCo v2, 200ep 82.4 57.0 63.6
ImageNet-1M, MoCo v2, 800ep 82.5 57.4 64.0

Note: These results are means of 5 trials. Variation on Pascal VOC is large: the std of AP50, AP, AP75 is expected to be 0.2, 0.2, 0.4 in most cases. We recommend to run 5 trials and compute means.