orrzohar / PROB

[CVPR 2023] Official Pytorch code for PROB: Probabilistic Objectness for Open World Object Detection
Apache License 2.0
111 stars 16 forks source link

IOD #69

Open Rzx520 opened 3 hours ago

Rzx520 commented 3 hours ago
          Hi @Wang0203,

The commands you need to use are along these lines:

python -u main_open_world.py \
    --output_dir "exps/IL/19_1" --dataset VOC2007 --PREV_INTRODUCED_CLS 0 --CUR_INTRODUCED_CLS 19\
    --train_set 'voc2007_trainval' --test_set 'voc2007_test' --epochs 61\
    --model_type 'prob' --obj_loss_coef 8e-4 --obj_temp 1.3\
    --wandb_name "${WANDB_NAME}_t1" --exemplar_replay_selection --num_inst_per_class 60\
    --exemplar_replay_dir ${WANDB_NAME} --exemplar_replay_cur_file "IL_19_ft.txt"\
    ${PY_ARGS}    

python -u main_open_world.py \
    --output_dir "exps/IL/19_1"  --dataset VOC2007 --PREV_INTRODUCED_CLS 19 --CUR_INTRODUCED_CLS 20\
    --train_set 'voc2007_trainval' --test_set 'voc2007_test' --epochs 81\
    --model_type 'prob' --obj_loss_coef 8e-4 --obj_temp 1.3\
    --wandb_name "${WANDB_NAME}_t1" --exemplar_replay_selection --num_inst_per_class 60\
    --exemplar_replay_dir ${WANDB_NAME}\
    --exemplar_replay_prev_file "IL_19_ft.txt" --exemplar_replay_cur_file "IL_19_1_ft.txt"\
    --pretrain "exps/IL/19_1/checkpoint0060.pth" --lr 2e-5\
    ${PY_ARGS}  

python -u main_open_world.py \
    --output_dir "exps/IL/19_1"  --dataset VOC2007 --PREV_INTRODUCED_CLS 19 --CUR_INTRODUCED_CLS 20\
    --train_set 'IL_19_1_ft' --test_set 'voc2007_test' --epochs 151\
    --model_type 'prob' --obj_loss_coef 8e-4 --obj_temp 1.3\
    --wandb_name "${WANDB_NAME}_t1" \
    --pretrain "exps/IL/19_1/checkpoint0080.pth"\
    ${PY_ARGS} 

If you want to run the 15+5/10+10 experiments, the PREV_INTRODUCED_CLS \ CUR_INTRODUCED_CLS will need to be changed accordingly.

I will stress that the number of training epochs/number of inst per class/objectness temperature need to be tuned to reproduce the results in the paper.

Hope this helps! Orr

Originally posted by @orrzohar in https://github.com/orrzohar/PROB/issues/8#issuecomment-1493109969

Rzx520 commented 2 hours ago

Do I need to change the parser. add.argument ('- num_classes', default=81, type=int) in main_openw_world.cy to 21?The voc only 20 categories.Meanwhile, Do we also need to modify the category composition in the tuple (VOC_COCO_CLASS_NAMES["VOC2007"] = tuple(itertools.chain(VOC_CLASS_NAMES, T2_CLASS_NAMES, T3_CLASS_NAMES, T4_CLASS_NAMES, UNK_CLASS)))? @orrzohar