amdegroot / ssd.pytorch

A PyTorch Implementation of Single Shot MultiBox Detector
MIT License
5.14k stars 1.75k forks source link

ValueError when using python eval.py #184

Open tomorrow00 opened 6 years ago

tomorrow00 commented 6 years ago

Traceback (most recent call last): File "eval.py", line 438, in thresh=args.confidence_threshold) File "eval.py", line 385, in test_net detections = net(x).data File "/home/wcc/miniconda2/envs/env_ws3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "/home/wcc/project_pytorch/ssd.pytorch-master/ssd.py", line 103, in forward self.priors.type(type(x.data)) # default boxes File "/home/wcc/project_pytorch/ssd.pytorch-master/layers/functions/detection.py", line 55, in forward ids, count = nms(boxes, scores, self.nms_thresh, self.top_k) ValueError: not enough values to unpack (expected 2, got 0)

I use the model of 'ssd300_mAP_77.43_v2.pth'. Don't know what's wrong with this

FawadArshad commented 6 years ago

did u fix it?... i am having similar problem.. please help

FawadArshad commented 6 years ago

found it change scores.dims to scores.size(0) https://github.com/amdegroot/ssd.pytorch/issues/154