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

error while detect image #1

Open
haojiubujian1985 opened this issue Apr 15, 2019 · 1 comment
Open

error while detect image #1

haojiubujian1985 opened this issue Apr 15, 2019 · 1 comment

Comments

@haojiubujian1985
Copy link

The torch version is 1.0. The error message is as follows. What is the problem?

/usr/local/lib/python2.7/site-packages/mtcnn/network/mtcnn_pytorch.py:9: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
nn.init.xavier_uniform(m.weight.data)
/usr/local/lib/python2.7/site-packages/mtcnn/network/mtcnn_pytorch.py:10: UserWarning: nn.init.constant is now deprecated in favor of nn.init.constant_.
nn.init.constant(m.bias, 0.1)
/usr/local/lib/python2.7/site-packages/torch/nn/functional.py:2423: 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))
Traceback (most recent call last):
File "detect_on_image_xb.py", line 33, in
boxes, landmarks = detector.detect(img)
File "/usr/local/lib/python2.7/site-packages/mtcnn/deploy/detect.py", line 59, in detect
stage_one_boxes = self.stage_one(img, threshold[0], factor, minsize, nms_threshold[0])
File "/usr/local/lib/python2.7/site-packages/mtcnn/deploy/detect.py", line 13, in wrapper
ret = func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/mtcnn/deploy/detect.py", line 236, in stage_one
img, size=(w, h), mode='bilinear')
File "/usr/local/lib/python2.7/site-packages/torch/nn/functional.py", line 2447, in interpolate
return torch._C._nn.upsample_bilinear2d(input, _output_size(2), align_corners)
TypeError: upsample_bilinear2d(): argument 'output_size' must be tuple of ints, but found element of type float at pos 1

@BrightXiaoHan
Copy link
Owner

BrightXiaoHan commented Apr 18, 2019

This project was only tested on python3. Is there the same error on python3?

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

2 participants