You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when I run python detect.py --images imgs --det det an error occurs when the input image is scream.jpg. The dimension of prediction is (1, 86)
$ python detect.py --images imgs --det det
Loading network.....
Network successfully loaded
/home/weiy/anaconda2/envs/py37/lib/python3.7/site-packages/torch/nn/modules/upsampling.py:129: UserWarning: nn.Upsample is deprecated. Use nn.functional.interpolate instead.
warnings.warn("nn.{} is deprecated. Use nn.functional.interpolate instead.".format(self.name))
messi.jpg predicted in 0.028 seconds
Objects Detected: person person person sports ball
----------------------------------------------------------
Traceback (most recent call last):
File "detect.py", line 234, in <module>
output = torch.cat((output,prediction))
RuntimeError: invalid argument 0: Sizes of tensors must match except in dimension 0. Got 86 and 8 in dimension 1 at /opt/conda/conda-bld/pytorch_1544202130060/work/aten/src/THC/generic/THCTensorMath.cu:83
It is fine if I test on scream.jpg only. But it is impossible to concat two predictions together (e.g., 4x8 tensor with 1x86 tensor).
I am using PyTorch 1.0. Therefore it might be caused by the updated version of pytorch.
------------------------------ UPDATE
Seems this problem happens when nothing is detected in the image. I use a blank image to test and got the same result.
download.jpg predicted in 6.025 seconds
Objects Detected: person
----------------------------------------------------------
SUMMARY
----------------------------------------------------------
Task : Time Taken (in seconds)
Reading addresses : 0.000
Loading batch : 0.098
Detection (1 images) : 6.028
Output Processing : 0.000
Drawing Boxes : 0.007
Average time_per_img : 6.133
----------------------------------------------------------
It's also interesting that there will be always a person detected in such kind of situation.
The text was updated successfully, but these errors were encountered:
bearpaw
changed the title
[Bug] Unexpected prediction dimension (1x86) for scream.jpg
[Bug] Unexpected prediction dimension (1x86) when nothing is detected (e.g., scream.jpg)
Jan 24, 2019
Hi, when I run
python detect.py --images imgs --det det
an error occurs when the input image isscream.jpg
. The dimension ofprediction
is(1, 86)
It is fine if I test on
scream.jpg
only. But it is impossible to concat two predictions together (e.g., 4x8 tensor with 1x86 tensor).I am using PyTorch 1.0. Therefore it might be caused by the updated version of pytorch.
------------------------------ UPDATE
Seems this problem happens when nothing is detected in the image. I use a blank image to test and got the same result.
It's also interesting that there will be always a
person
detected in such kind of situation.The text was updated successfully, but these errors were encountered: