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

KeyError: 'roi_heads.mask_head.predictor.weight' #7

Open
dashenfeng opened this issue Jul 7, 2024 · 1 comment
Open

KeyError: 'roi_heads.mask_head.predictor.weight' #7

dashenfeng opened this issue Jul 7, 2024 · 1 comment

Comments

@dashenfeng
Copy link

Hello!When I run the bash finetuning.sh ,

## # For test all base + novel classes
python3 -m tools.ckpt_surgery --coco \
        --src1 checkpoints/coco/${network}/${network}_R_${arch}_FPN_base${suffix}/model_final.pth \
        --src2 checkpoints/coco/${network}/${network}_R_${arch}_FPN_ft_novel_${shot}shot${suffix}${suffix2}/model_final.pth \
        --method combine \
        --save-dir checkpoints/coco/${network}/${network}_R_${arch}_FPN_all_final_${shot}shot${suffix}${suffix2}
#

I got the error:

Traceback (most recent call last):
File "/home/ecust/1TSSD/anaconda3/envs/iFS-RCNN/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/ecust/1TSSD/anaconda3/envs/iFS-RCNN/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 343, in
combine_ckpts(args)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 140, in combine_ckpts
surgery_loop(args, surgery)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 236, in surgery_loop
surgery(param_name, True, tar_size_dict[param_name], ckpt, ckpt2)
File "/home/ecust/1TSSD/ycf/iFS-RCNN/tools/ckpt_surgery.py", line 98, in surgery
pretrained_weight = ckpt['model'][weight_name_temp]
KeyError: 'roi_heads.mask_head.predictor.weight'

I want to know why it happened?

@dashenfeng
Copy link
Author

and could you tell me the version of fsdet your code use? I found two version, one is v0.1 in release ,and another is the latest in github https://github.com/ucbdrive/few-shot-object-detection?tab=readme-ov-file#installation

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