prannaykaul / lvc

Official repo for our CVPR 22 paper: "Label, Verify, Correct: A Simple Few-Shot Object Detection Method"
Apache License 2.0
88 stars 14 forks source link

TRAIN_FULL.md Part 2, Step 3 #8

Closed takbess closed 2 years ago

takbess commented 2 years ago

Following the instructions, I tried the command:

python -m tools.train_net_reg \
    --config-file configs/COCO-detection/cascade_ubbr_R_50_FPN_base.yaml \
    --num-gpus 8 \
    --opts \
    DATASETS.PROPOSALS_FILES_TRAIN "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_base/inference/coco_proposals_trainval_results.pkl',)" \
    DATASETS.PROPOSALS_FILES_TEST "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_base/inference/coco_proposals_test_results.pkl',)"

The difference from the original command of Part 2, Step 3 in TRAIN_FULL.md is "--num-gpus 8" and additional line "--opts \".

Then, I got the error:

AssertionError: Non-existent key: DATASETS.PROPOSALS_FILES_TRAIN

So, I'm modifying the command as

python -m tools.train_net_reg \
    --config-file configs/COCO-detection/cascade_ubbr_R_50_FPN_base.yaml \
    --num-gpus 8 \
    --opts \
    DATASETS.PROPOSAL_FILES_TRAIN "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_base/inference/coco_proposals_trainval_results.pkl',)" \
    DATASETS.PROPOSAL_FILES_TEST "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_base/inference/coco_proposals_test_results.pkl',)"

The difference is "PROPOSALS" -> "PROPOSAL" for "DATASETS.PROPOSALS_FILES_TRAIN" and "DATASETS.PROPOSALS_FILES_TEST".

Is this modification correct?

prannaykaul commented 2 years ago

Yes this is simply a typo, I will update the scripts accordingly.

takbess commented 2 years ago

Thank you for a quick response.

The following may also be a typo. In Part2 Step 4, I ran the following command:

python -m tools.train_net_reg \
    --config-file configs/COCO-detection/cascade_ubbr_R_50_FPN_ft_all_30shot_aug_ftmore.yaml \
    --num-gpus 4 \
    --opts \
    DATASETS.PROPOSAL_FILES_TRAIN "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_ft_all_30shot_aug_ftmore_dropout/inference/coco_proposals_trainval_results.pkl',)" \
    DATASETS.PROPOSAL_FILES_TEST "('checkpoints/coco/faster_rcnn/faster_rcnn_R_51_FPN_ft_all_30shot_aug_ftmore_dropout/inference/coco_proposals_test_results.pkl',)"

"--opts" is needed in my case because I am using the scripts before your fixing. Then, I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'checkpoints/coco/faster_rcnn/faster_rcnn_R_51_FPN_ft_all_30shot_aug_ftmore_dropout/inference/coco_proposals_test_results.pkl'

So, I'm modifying the command as

python -m tools.train_net_reg \
    --config-file configs/COCO-detection/cascade_ubbr_R_50_FPN_ft_all_30shot_aug_ftmore.yaml \
    --num-gpus 4 \
    --opts \
    DATASETS.PROPOSAL_FILES_TRAIN "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_ft_all_30shot_aug_ftmore_dropout/inference/coco_proposals_trainval_results.pkl',)" \
    DATASETS.PROPOSAL_FILES_TEST "('checkpoints/coco/faster_rcnn/faster_rcnn_R_50_FPN_ft_all_30shot_aug_ftmore_dropout/inference/coco_proposals_test_results.pkl',)"

The difference is R_51 -> R_50. I hope this modification is correct.

prannaykaul commented 2 years ago

yes another typo, scripts updated.