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

ValueError: not enough values to unpack (expected 2, got 0) #3

Open
colorjam opened this issue May 20, 2020 · 3 comments
Open

ValueError: not enough values to unpack (expected 2, got 0) #3

colorjam opened this issue May 20, 2020 · 3 comments

Comments

@colorjam
Copy link

Hi, thank you for sharing the code.
When I run test.py with light_test_widerface(), I get the following error:

Traceback (most recent call last):
  File "test.py", line 215, in <module>
    light_test_widerface()
  File "test.py", line 207, in light_test_widerface
    det = infer(net , img , transform , thresh , cuda , shrink)
  File "test.py", line 98, in infer
    y = net(x)      # forward pass
  File "/home/v-chenqy/.pyenv/versions/py37/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/v-chenqy/Repo/lightDSFD/light_face_ssd.py", line 333, in forward
    self.priors.type(type(x.data))                 # default boxes
  File "/home/v-chenqy/Repo/lightDSFD/layers/functions/detection.py", line 76, in forward
    ids, count = nms(boxes, scores, self.nms_thresh, self.top_k)
ValueError: not enough values to unpack (expected 2, got 0)
@xinzi2018
Copy link

i have the same question.

@swordlidev
Copy link
Owner

原因是检测的结果为空,就是boxes是空的,需要添加一个判断

@xinzi2018
Copy link

谢谢 已解决

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

3 participants