Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eval of coco_2017_val for `coco_65_cls_emb.pth' #103

Open
ppriyank opened this issue Oct 11, 2024 · 0 comments
Open

Eval of coco_2017_val for `coco_65_cls_emb.pth' #103

ppriyank opened this issue Oct 11, 2024 · 0 comments

Comments

@ppriyank
Copy link

ppriyank commented Oct 11, 2024

If I want to evaluate the performance on coco_2017_val (80 classes) for

WT=./pretrained_ckpt/regionclip/regionclip_pretrained-cc_rn50.pth
CLIP_WT=./pretrained_ckpt/concept_emb/coco_65_cls_emb.pth

Currently, I'm doing

MODEL_CONFIG=configs/COCO-InstanceSegmentation/CLIP_fast_rcnn_R_50_C4_ovd_coco80.yaml
WT=./pretrained_ckpt/regionclip/regionclip_pretrained-cc_rn50.pth
CLIP_WT=./pretrained_ckpt/concept_emb/coco_65_cls_emb.pth
CUDA_VISIBLE_DEVICES=0 python ./tools/train_net.py --eval-only  --num-gpus 1 \
    --config-file $MODEL_CONFIG MODEL.WEIGHTS $WT MODEL.CLIP.TEXT_EMB_PATH $CLIP_WT \
    MODEL.CLIP.CROP_REGION_TYPE GT MODEL.CLIP.MULTIPLY_RPN_SCORE False \
    MODEL.ROI_HEADS.NUM_CLASSES 65

# [10/11 19:44:37 d2.evaluation.testing]: copypaste: Task: bbox
# [10/11 19:44:37 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl
# [10/11 19:44:37 d2.evaluation.testing]: copypaste: 8.4155,8.4626,8.4114,6.4665,8.4770,9.6864

Is this allowed? or do I have to switch the RPN head to ./pretrained_ckpt/concept_emb/coco_80_cls_emb.pth

like this

WT=./pretrained_ckpt/regionclip/regionclip_pretrained-cc_rn50.pth
CLIP_WT=./pretrained_ckpt/concept_emb/coco_80_cls_emb.pth

CUDA_VISIBLE_DEVICES=0 python ./tools/train_net.py --eval-only  --num-gpus 1 \
    --config-file $MODEL_CONFIG MODEL.WEIGHTS $WT MODEL.CLIP.TEXT_EMB_PATH $CLIP_WT \
    MODEL.CLIP.CROP_REGION_TYPE GT MODEL.CLIP.MULTIPLY_RPN_SCORE False 

# [10/11 19:44:37 d2.evaluation.testing]: copypaste: Task: bbox
# [10/11 19:52:25 d2.evaluation.testing]: copypaste: AP,AP50,AP75,APs,APm,APl
# [10/11 19:52:25 d2.evaluation.testing]: copypaste: 58.1881,58.6332,58.1368,45.0736,65.9012,61.9111

Is this correct? Basically how to evaluate coco_65_cls_emb.pth on coco_2017_val (evaluation on basically 80 - 65 novel classes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant