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

Reshaping boxes in create_detections: size not consistent #8

Open
acscas opened this issue Jun 4, 2018 · 1 comment
Open

Reshaping boxes in create_detections: size not consistent #8

acscas opened this issue Jun 4, 2018 · 1 comment

Comments

@acscas
Copy link

acscas commented Jun 4, 2018

Great code, thanks for making it available and writing the Medium articles!

Having an issue running create_detections.py: the reshape code at line 132 throws an error when I run it on a single image:

Traceback (most recent call last):
  File "../DIUx_code/baseline-master/inference/create_detections.py", line 132, in <module>
    bfull = boxes[:wn*hn].reshape((wn,hn,num_preds,4))
ValueError: cannot reshape array of size 40000 into shape (10,10,250,4)

The image is 1036.tif, with a size of 3215 x 3195. The default chip size (300,300) create wn = 10, hn = 10. And the "boxes" variable from "generate_detections" is shape [100,100,4]. So the reshape call (with num_preds=250 as default) requires the boxes[:100] to be 100k but it's 100x100x4=40k in size.

Have you run into this? Not sure of a simple fix. Thanks!

@LynnKaack
Copy link

I have the same problem. It works fine if I use create_detections.py with the vanilla model provided but it does not work if I use a different model configuration. I am trying to find out how I can modify it to match the current model I am using (ssd_mobilenet_v1_coco).

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

2 participants