hasanirtiza / Pedestron

[Pedestron] Generalizable Pedestrian Detection: The Elephant In The Room. @ CVPR2021
https://openaccess.thecvf.com/content/CVPR2021/papers/Hasan_Generalizable_Pedestrian_Detection_The_Elephant_in_the_Room_CVPR_2021_paper.pdf
Apache License 2.0
682 stars 159 forks source link

Demo not workingt #147

Closed MahdiyarMM closed 1 year ago

MahdiyarMM commented 1 year ago

I have installed everything according to the installation file. However, when I run the demo code, I face this error.

(base) mahdiyar@mahdiyar-Z590-AORUS-ULTRA:~/Desktop/test/Pedestron$ sudo docker run --gpus all --shm-size=8g -it --rm pedestron root@5817d5e5ee62:/pedestron# python tools/demo.py configs/elephant/cityperson/cascade_hrnet.py ./models_pretrained/epoch_5.pth.stu demo/ result_demo/ demo/ ['demo/3.png', 'demo/1.png', 'demo/2.png'] unexpected key in source state_dict: mask_head.0.conv_res.conv.weight, mask_head.0.conv_res.conv.bias, mask_head.1.conv_res.conv.weight, mask_head.1.conv_res.conv.bias, mask_head.2.conv_res.conv.weight, mask_head.2.conv_res.conv.bias

/pedestron/tools/../mmdet/apis/inference.py:39: UserWarning: Class names are not saved in the checkpoint's meta data, use COCO classes by default. warnings.warn('Class names are not saved in the checkpoint\'s ' [ ] 0/3, elapsed: 0s, ETA:Traceback (most recent call last): File "tools/demo.py", line 67, in run_detector_on_dataset() File "tools/demo.py", line 63, in run_detector_on_dataset detections = mock_detector(model, im, output_dir) File "tools/demo.py", line 37, in mock_detector results = inference_detector(model, image) File "/pedestron/tools/../mmdet/apis/inference.py", line 66, in inference_detector return _inference_single(model, imgs, img_transform, device) File "/pedestron/tools/../mmdet/apis/inference.py", line 93, in _inference_single result = model(return_loss=False, rescale=True, data) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, *kwargs) File "/pedestron/tools/../mmdet/core/fp16/decorators.py", line 49, in new_func return old_func(args, kwargs) File "/pedestron/tools/../mmdet/models/detectors/base.py", line 88, in forward return self.forward_test(img, img_meta, kwargs) File "/pedestron/tools/../mmdet/models/detectors/base.py", line 79, in forward_test return self.simple_test(imgs[0], img_metas[0], kwargs) File "/pedestron/tools/../mmdet/models/detectors/cascade_rcnn.py", line 241, in simple_test x = self.extract_feat(img) File "/pedestron/tools/../mmdet/models/detectors/cascade_rcnn.py", line 115, in extractfeat x = self.backbone(img) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(*input, *kwargs) File "/pedestron/tools/../mmdet/models/backbones/hrnet.py", line 446, in forward x = self.relu(x) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 541, in call result = self.forward(input, **kwargs) File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/activation.py", line 94, in forward return F.relu(input, inplace=self.inplace) File "/opt/conda/lib/python3.6/site-packages/torch/nn/functional.py", line 912, in relu result = torch.relu(input) RuntimeError: CUDA error: no kernel image is available for execution on the device

hasanirtiza commented 1 year ago

Most probably it is an installation issue. Have a look on some similar problems on mmdetection, here and here. For starters, what are your pytorch, cuda, mmcv versions.