We use detectron2 to train the object detection models. To install the package, please follow the installation instructions.
-
Put the COCO dataset under
benchmarks/detection/datasetsdirectory, following the directory structure requried by detectron2. -
Convert the pre-trained backbone weights to detectron2's format:
cd benchmarks/detection WEIGHT_FILE="ss-prl.pth.tar" # pre-trained weight OUTPUT_FILE="ss-prl.pkl" # converted output file python convert-pretrain-to-detectron2.py ${WEIGHT_FILE} ${OUTPUT_FILE}
CONVERTED_WEIGHT="ss-prl.pkl" # converted pre-trained weight
LOG_DIR="./log" # where to write training logs
bash run.sh ${CONVERTED_WEIGHT} ${LOG_DIR}