lightDSFD
lightDSFD copied to clipboard
ValueError: not enough values to unpack (expected 2, got 0)
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)
i have the same question.
原因是检测的结果为空,就是boxes是空的,需要添加一个判断
谢谢 已解决