CenterMask icon indicating copy to clipboard operation
CenterMask copied to clipboard

Finetuning with existing model

Open Auth0rM0rgan opened this issue 4 years ago • 1 comments

Hi @youngwanLEE ,

Would you please help me how can I do finetuning on the existed models to get the mask of only one class (person) of coco dataset? I need my model to detect only person, not 80 objects and I don't want to train the model from scratch. I have tried to follow maskrcnn-benchmark to do the finetunning but when I tried to trim the model to get rid of the last layers, I'm getting this error

detectron path: /home/XX/CenterMask/centermask-lite-M-v2-bs16-4x.pth Traceback (most recent call last): File "trimCenterMaskModel.py", line 43, in <module> _d = load_c2_format(cfg, DETECTRON_PATH) File "/home/media4us/PycharmProjects/CenterMask/maskrcnn_benchmark/utils/c2_model_loading.py", line 176, in load_c2_format return C2_FORMAT_LOADER[cfg.MODEL.BACKBONE.CONV_BODY](cfg, f) KeyError: 'MNV2-FPN-RETINANET'

My command line:

python trimCenterMaskModel.py --pretrained_path /home/media4us/PycharmProjects/CenterMask/centermask-lite-M-v2-bs16-4x.pth --save_path /home/media4us/PycharmProjects/CenterMask/centermask_Test --cfg configs/centermask/centermask_M_v2_FPN_lite_res600_ms_bs16_4x.yaml

Auth0rM0rgan avatar Mar 17 '20 14:03 Auth0rM0rgan

Hello @Auth0rM0rgan did you figure out how to do finetuning? I'm also trying to finetune CenterMask on coco person only dataset. Can you share any references or scripts that i should look into. Thanks!

rohanshingade avatar Nov 10 '20 19:11 rohanshingade