CenterMask
CenterMask copied to clipboard
centermask_demo.py: list index out of range
I trained model with custom dataset. "python tools/test_net.py" works fine, shows results. But when I try to run centermask_demo.py to visialize results I get error. Problem is with custom dataset only, pretrained model from site works fine.
cmd line:
py demo\centermask_demo.py --input z:\files\plate\testing\in.mp4 --config-file "configs/centermask/centermask_V_19_eSE_FPN_lite_res600_ms_bs16_4x.yaml" --weights "datasets/model_00100000.pth"
result:
file 0
Traceback (most recent call last):
File "demo\centermask_demo.py", line 167, in <module>
main()
File "demo\centermask_demo.py", line 136, in main
composite = coco_demo.run_on_opencv_image(img)
File "e:\files\tmp\CenterMask\demo\predictor.py", line 223, in run_on_opencv_image
predictions = self.compute_prediction(image)
File "e:\files\tmp\CenterMask\demo\predictor.py", line 261, in compute_prediction
prediction = predictions[0]
IndexError: list index out of range
@enhany
This error occurs when there is no detection result.
Why don't you add try ~ except ?
@youngwanLEE Hi, I try your mobv2 pretrained model. But it seems every images got this list index out of range error. It's unnormal. any tips? thank you.
try add --opts MODEL.WEIGHTS xxx.pth to your command line.
@dragen1860 Hi, I met the same problem.Did you solve it through use the command line before?
@enhany Hi, I meet the same problem.Did you solve it?I think maybe you can help me to solve this problem.Thanks.
@dragen1860 Hi, I met the same problem.Did you solve it through use the command line before?
I cannt remember it clearly. I guess I have solved this as I mentioned above.
@dragen1860 Hi, I met the same problem.Did you solve it through use the command line before?
I cannt remember it clearly. I guess I have solved this as I mentioned above.
OK.Thanks,i‘ll try it again.
i also meet this problem,it seems that the predictions of all images return a none []
I meet the same problem. And solved it finally. My situation: When I use other .yaml and .pth instead of centermask-lite-M-v2(default), it works. So I think there are some wrongs with the file "centermask-lite-M-v2", or it's really only able to predict nothing from all imgs......
@BWYWTB Thanks for your sharing,i'll try again