|
||
---|---|---|
configs | ||
datasets | ||
demo | ||
detectron2 | ||
dev | ||
docker | ||
docs | ||
projects | ||
tests | ||
tools | ||
GETTING_STARTED.md | ||
INSTALL.md | ||
LICENSE | ||
MODEL_ZOO.md | ||
README.md | ||
ablation.sh | ||
replicate.sh | ||
requirement.txt | ||
run.sh | ||
run_OWOD_origin.sh | ||
setup.cfg | ||
setup.py | ||
visualise_detections.py |
README.md
Revisiting Open World Object Detection [arXiv]
Installation
See INSTALL.md.
Dataset
Our new data division is based on COCO2017. We divide the training set into four tasks, in which each task has 20 categories. For each task, we obtained images containing the categories of each task from the training set, and removed the annotation information of other categories in these pictures during training. In each task, 1000 images are sampled as the validation set. And we de duplicate the training set and the validation set. For the testing set, we adopt the validation set of COCO2017, which contains relatively complete annotation information.
The data files are at ./datasets/Main/.
Train
Train with PAD:
The PAD module is implemented in ./detectron2/modeling/roi_heads/roi_heads.py,where the file generated by selective search needs to be loaded. The code that generates these files is in the ./datasets/save_selective_search.py.
Inference
Inference with CEC
python tools/train_net.py --num-gpus 3\
--eval-only --config-file ./configs/OWOD/t1/t1_test.yaml \
SOLVER.IMS_PER_BATCH 6 SOLVER.BASE_LR 0.005 \
OUTPUT_DIR "./output/t1/test_dir/" \
MODEL.WEIGHTS "/Path/To/Your/Model" \
OWOD.GENERATE_CALI False \
OWOD.CALI_PATH "/home/RE-OWOD-main/analysis/t1_REOWOD_train_scores_cali_07" \
OWOD.UNK_THRESH 0.6
Inference without CEC
python tools/train_net.py --num-gpus 3\
--eval-only --config-file ./configs/OWOD/t1/t1_test.yaml \
SOLVER.IMS_PER_BATCH 6 SOLVER.BASE_LR 0.005 \
OUTPUT_DIR "./output/t1/test_dir/" \
MODEL.WEIGHTS "/Path/To/Your/Model" \
OWOD.GENERATE_CALI True
If you want to generate CEC pickle file with train datasets, you need to repalce "./detectron2/evaluation/evaluator.py" with "./detectron2/evaluation/evaluator_cali.py". Remember to add current stage to CEC pickle files' name in "./detectron2/evaluation/evaluator_cali.py".
python tools/train_net.py --num-gpus 3\
--eval-only --config-file ./configs/OWOD/t1/t1_test.yaml \
SOLVER.IMS_PER_BATCH 6 SOLVER.BASE_LR 0.005 \
OUTPUT_DIR "./output/t1/test_dir/" \
MODEL.WEIGHTS "/Path/To/Your/Model" \
OWOD.GENERATE_CALI True