[go: nahoru, domu]

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

centermask_demo.py: list index out of range #21

Open
enhany opened this issue Feb 14, 2020 · 10 comments
Open

centermask_demo.py: list index out of range #21

enhany opened this issue Feb 14, 2020 · 10 comments

Comments

@enhany
Copy link
enhany commented Feb 14, 2020

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
@youngwanLEE
Copy link
Owner

@enhany

This error occurs when there is no detection result.

Why don't you add try ~ except ?

@dragen1860
Copy link

@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.

@dragen1860
Copy link

try add --opts MODEL.WEIGHTS xxx.pth to your command line.

@RUkiki
Copy link
RUkiki commented May 6, 2020

@dragen1860 Hi, I met the same problem.Did you solve it through use the command line before?

@RUkiki
Copy link
RUkiki commented May 11, 2020

@enhany Hi, I meet the same problem.Did you solve it?I think maybe you can help me to solve this problem.Thanks.

@dragen1860
Copy link

@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.

@RUkiki
Copy link
RUkiki commented May 13, 2020

@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.

@ZhangZhongHuaJJ
Copy link

i also meet this problem,it seems that the predictions of all images return a none []

@PinxueGuo
Copy link
PinxueGuo commented Aug 30, 2020

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......

@ZhangZhongHuaJJ
Copy link

@BWYWTB Thanks for your sharing,i'll try again

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

6 participants