You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The faster_rcnn_r50_sspnet_1x_coco can be trained correctly, but when I inference the trained model then encountered the error below.
inference_detector(model, imagepath)
python inference_img.py
/home/ubuntu/mmdetection-2.19.0/mmdet/models/builder.py:53: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model
'please specify them in model', UserWarning)
load checkpoint from local path: /home/ubuntu/fovea/sspnet/epoch_1.pth
/home/ubuntu/mmdetection-2.19.0/mmdet/datasets/utils.py:69: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
'data pipeline in your config file.', UserWarning)
/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
File "inference_img.py", line 26, in
result = inference_detector(model, imagepath)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/apis/inference.py", line 147, in inference_detector
results = model(return_loss=False, rescale=True, **data)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
return old_func(*args, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 174, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 186, in simple_test
x = self.extract_feat(img)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 70, in extract_feat
x, att = self.neck(x)
ValueError: too many values to unpack (expected 2)
The text was updated successfully, but these errors were encountered:
The faster_rcnn_r50_sspnet_1x_coco can be trained correctly, but when I inference the trained model then encountered the error below.
inference_detector(model, imagepath)
python inference_img.py
/home/ubuntu/mmdetection-2.19.0/mmdet/models/builder.py:53: UserWarning: train_cfg and test_cfg is deprecated, please specify them in model
'please specify them in model', UserWarning)
load checkpoint from local path: /home/ubuntu/fovea/sspnet/epoch_1.pth
/home/ubuntu/mmdetection-2.19.0/mmdet/datasets/utils.py:69: UserWarning: "ImageToTensor" pipeline is replaced by "DefaultFormatBundle" for batch inference. It is recommended to manually replace it in the test data pipeline in your config file.
'data pipeline in your config file.', UserWarning)
/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/functional.py:718: UserWarning: Named tensors and all their associated APIs are an experimental feature and subject to change. Please do not use them for anything important until they are released as stable. (Triggered internally at /pytorch/c10/core/TensorImpl.h:1156.)
return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode)
Traceback (most recent call last):
File "inference_img.py", line 26, in
result = inference_detector(model, imagepath)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/apis/inference.py", line 147, in inference_detector
results = model(return_loss=False, rescale=True, **data)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ubuntu/anaconda3/envs/openmmlab2/lib/python3.7/site-packages/mmcv/runner/fp16_utils.py", line 109, in new_func
return old_func(*args, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 174, in forward
return self.forward_test(img, img_metas, **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/base.py", line 147, in forward_test
return self.simple_test(imgs[0], img_metas[0], **kwargs)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 186, in simple_test
x = self.extract_feat(img)
File "/home/ubuntu/mmdetection-2.19.0/mmdet/models/detectors/faster_rcnn_ssp.py", line 70, in extract_feat
x, att = self.neck(x)
ValueError: too many values to unpack (expected 2)
The text was updated successfully, but these errors were encountered: