The official implementation of Pseudo-Label Diversity Exploitation for Few-Shot Object Detection
- Linux with Python >= 3.6
- PyTorch >= 1.3
- torchvision that matches the PyTorch installation
- Dependencies:
pip install -r requirements.txt
- pycocotools:
pip install cython; pip install 'git+https://github.com/cocodataset/cocoapi.git#subdirectory=PythonAPI'
- fvcore:
pip install 'git+https://github.com/facebookresearch/fvcore'
- OpenCV, optional, needed by demo and visualization
pip install opencv-python
- GCC >= 4.9
python tools/train_net.py --num-gpus 1 \
--configs/COCO-detection/faster_rcnn_R_101_FPN_base.yaml
python tools/ckpt_surgery.py \
--src1 checkpoints/coco/faster_rcnn/faster_rcnn_R_101_FPN/model_final.pth \
--method randinit \
--save-dir checkpoints/coco/faster_rcnn/faster_rcnn_R_101_FPN
python tools/train_net.py --num-gpus 1 \
--configs/COCO-detection/faster_rcnn_R_101_FPN_ft_all_10shot.yaml
--opts MODEL.WEIGHTS WEIGHTS_PATH
python3 -m tools.genarate_pseudo --num-gpus 1
python3 -m tools.train_feature --num-gpus 1
To evaluate the trained models, run
python tools/test_net.py --num-gpus 1 \
--config-file configs/COCO-detection/faster_rcnn_R_101_FPN_ft_all_10shot.yaml \
--eval-only