diff --git a/README.md b/README.md index d73dc9d..99643dc 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,48 @@ For the testing set, we adopt the validation set of COCO2017, which contains rel The data files are at [./datasets/Main/](./datasets/Main/). +## Train +Train with PAD: + +The PAD module is implemented in [./detectron2/modeling/roi_heads/roi_heads.py](./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](./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 +``` +