Custom_MaskRCNN icon indicating copy to clipboard operation
Custom_MaskRCNN copied to clipboard

custom.py: error: the following arguments are required: <command>, --weights

Open sauravpantha opened this issue 4 years ago • 4 comments

Hello Soumya,

I have been trying to run your MaskRCNN code for an object detection project and have been running into this error. I believe that the script is not able to download the coco weights but am not sure how to fix it.

Thanks, Saurav

sauravpantha avatar Dec 07 '20 08:12 sauravpantha

Hi, Saurav I will be needing your error message.

soumyaiitkgp avatar Dec 07 '20 10:12 soumyaiitkgp

Hi Soumya,

Thank you for responding. This is the error message which pops up when I run the script using command line.

custom.py: error: the following arguments are required: , --weights

I think the script is not able to download coco weights (weights.h5 is in the location) but I don't seem to be able to figure it out. I think its the same problem someone else posted on your medium blog but that solution doesn't work for me.

sauravpantha avatar Dec 07 '20 19:12 sauravpantha

Hi, Saurav. If you think that script is not able to download/detect the weights then please download them manually to the parent folder. And then check again.

soumyaiitkgp avatar Dec 19 '20 02:12 soumyaiitkgp

Potential cause of this error might be that you have used the tutorial here. In this tutorial the command to run training is as follows: python custom.py train — dataset=D:/../CustomMask_RCNN/samples/custom/dataset — weights=coco. The long dash <->, is suppose to be two dashes <-->.

Use python custom.py train --dataset=D:/../CustomMask_RCNN/samples/custom/dataset --weights=coco to run training.

sadhoss avatar Jul 14 '21 09:07 sadhoss