Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 1.04 KB

detector_train.md

File metadata and controls

32 lines (23 loc) · 1.04 KB

Training your own detectors

To train your own detectors, follow the steps below:

  1. Download the LVIS v0.5 annotations and (LVIS v0.5 + COCO) training annotations from here, and extract them to ./data/detectron_datasets/lvis-coco.

  2. Setup detectron2.

  3. Download the COCO train2017 and val2017 datasets, and link them to:

    ./data/detectron_datasets/lvis-coco/train2017
    ./data/detectron_datasets/lvis-coco/val2017
    
  4. Use the provided ./scripts/detectors/detectron2_train_net.py script to train your detector.

    python scripts/detectors/detectron2_train_net.py \
        --num-gpus 8 \
        --config-file ./data/configs/LVIS-InstanceSegmentation/mask_rcnn_R_101_FPN_1x.yaml \
        DATASETS.TRAIN "('lvis_v0.5_coco_2017_train', )" \
        OUTPUT_DIR /path/to/output-dir
    

    This script was tested with detectron2 commit id fd87af71eebc660dde2f50e4693869bb04f66015.