Open fengzifrank opened 5 years ago
I meet same problems,can you solve it ?@fengzifrank
This is a warning from PyTorch as there is a change in the behavior of upsampling since version 0.4.0. You can safely ignore this warning.
The problem of changing his model is solved. CornerNet_Saccade() seems to have some problems.
import cv2 from core.detectors import CornerNet_Squeeze from core.vis_utils import draw_bboxes
detector = CornerNet_Squeeze() image = cv2.imread("demo.jpg")
bboxes = detector(image) image = draw_bboxes(image, bboxes) cv2.imwrite("demo_1.jpg", image)
This error occurs when I run demo.py loading from ../cache/nnet/CornerNet_Squeeze/CornerNet_Squeeze_500000.pkl Segmentation fault
In pytorch official tutorial, there are some clear explanation about this problem. https://pytorch.org/docs/stable/nn.html?highlight=upsample#torch.nn.Upsample that is: With align_corners = True, the linearly interpolating modes (linear, bilinear, bicubic, and trilinear) don’t proportionally align the output and input pixels, and thus the output values can depend on the input size. This was the default behavior for these modes up to version 0.3.1. Since then, the default behavior is align_corners = False. See below for concrete examples on how this affects the outputs.
seems it is related with pytorch jit: https://github.com/DeepVAC/MLab/issues/47
This error occurs when I run demo.py. Is this a problem with pytorch? However, the environment is executed according to the configuration file. thank you
loading from /test/CornerNet-Lite/core/../cache/nnet/CornerNet_Saccade/CornerNet_Saccade_500000.pkl /opt/conda/envs/CornerNet_Lite/lib/python3.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))
I solved problem. the problem is opencv version base on c++, so that is Segmentation fault just typed the commandline to change version of opencv: $ pip3 install opencv-python==4.0.1.24
This error occurs when I run demo.py. Is this a problem with pytorch? However, the environment is executed according to the configuration file. thank you
loading from /test/CornerNet-Lite/core/../cache/nnet/CornerNet_Saccade/CornerNet_Saccade_500000.pkl /opt/conda/envs/CornerNet_Lite/lib/python3.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))