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

demo.py issue #15

Closed
kaishijeng opened this issue Apr 30, 2018 · 4 comments
Closed

demo.py issue #15

kaishijeng opened this issue Apr 30, 2018 · 4 comments

Comments

@kaishijeng
Copy link

Encounter an error when running demo.py below:
python3 ./demo.py --cfg=./experiments/cfgs/fssd_lite_mobilenetv1_train_voc.yml --demo=./experiments/person.jpg

===> Building model
/home/topspin/2TB/src/ssds.pytorch/lib/modeling/model_builder.py:51: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
x = torch.autograd.Variable(x, volatile=True) #.cuda()
/usr/local/lib/python3.5/dist-packages/torch/nn/functional.py:1761: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
"See the documentation of nn.Upsample for details.".format(mode))
==>Feature map size:
[(38, 38), (19, 19), (10, 10), (5, 5), (3, 3), (1, 1)]
/home/topspin/2TB/src/ssds.pytorch/lib/ssds.py:21: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
self.priors = Variable(self.priorbox.forward(), volatile=True)
Utilize GPUs for computation
Number of GPU available 1
=> loading checkpoint ./weights/fssd_lite/mobilenet_v1_fssd_lite_voc_78.4.pth
/home/topspin/2TB/src/ssds.pytorch/lib/ssds.py:68: UserWarning: volatile was removed and now has no effect. Use with torch.no_grad(): instead.
x = Variable(self.preprocessor(img)[0].unsqueeze(0),volatile=True)
Traceback (most recent call last):
File "./demo.py", line 154, in
demo(args, args.demo_file)
File "./demo.py", line 59, in demo
_labels, _scores, _coords = object_detector.predict(image)
File "/home/topspin/2TB/src/ssds.pytorch/lib/ssds.py", line 82, in predict
detections = self.detector.forward(out)
File "/home/topspin/2TB/src/ssds.pytorch/lib/layers/functions/detection.py", line 151, in forward
ids, count = nms(boxes, scores, self.nms_thresh, self.top_k)
ValueError: not enough values to unpack (expected 2, got 0)

@foreverYoungGitHub
Copy link
Collaborator

I think you are using pytorch 0.4.0. currently the code is suitable for 0.3.1. It'll update to 0.4.0 in few weeks.

@kaishijeng
Copy link
Author

Yes, it is due to 0.4.0

Thanks,

@XiaSunny
Copy link

XiaSunny commented Jan 20, 2019

您好,请问下,你这个文件:mobilenet_v1_fssd_lite_voc_78.4.pth是怎么得到的?我的weight路径下什么都没有呀 @kaishijeng

@kamauz
Copy link

kamauz commented Feb 28, 2019

I've tried to use PyTorch 0.3.1 but now the problem is on the GPU that is not supported 😆

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

4 participants