aim-uofa / AdelaiDet

AdelaiDet is an open source toolbox for multiple instance-level detection and recognition tasks.
https://git.io/AdelaiDet
Other
3.39k stars 652 forks source link

No instance detected when following BlendMask README #341

Closed kaixin-bai closed 3 years ago

kaixin-bai commented 3 years ago

I followed QuickStart in BlendMask's README.

wget -O blendmask_r101_dcni3_5x.pth https://cloudstor.aarnet.edu.au/plus/s/vbnKnQtaGlw8TKv/download
python demo/demo.py \
    --config-file configs/BlendMask/R_101_dcni3_5x.yaml \
    --input datasets/coco/val2017/000000005992.jpg \
    --confidence-threshold 0.35 \
    --opts MODEL.WEIGHTS blendmask_r101_dcni3_5x.pth

and got message bellow:

[04/04 13:23:49 detectron2]: Arguments: Namespace(confidence_threshold=0.35, config_file='configs/BlendMask/R_101_dcni3_5x.yaml', input=['datasets/coco/val2017/000000005992.jpg'], opts=['MODEL.WEIGHTS', 'blendmask_r101_dcni3_5x.pth'], output=None, video_input=None, webcam=False)
WARNING [04/04 13:23:49 d2.config.compat]: Config 'configs/BlendMask/R_101_dcni3_5x.yaml' has no VERSION. Assuming it to be compatible with latest v2.
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
error in modulated_deformable_im2col_cuda: invalid device function
/Projects/blendmask/AdelaiDet/adet/modeling/fcos/fcos_outputs.py:484: UserWarning: This overload of nonzero is deprecated:
    nonzero()
Consider using one of the following signatures instead:
    nonzero(*, bool as_tuple) (Triggered internally at  /opt/conda/conda-bld/pytorch_1607370116979/work/torch/csrc/utils/python_arg_parser.cpp:882.)
  per_candidate_nonzeros = per_candidate_inds.nonzero()
[04/04 13:23:52 detectron2]: datasets/coco/val2017/000000005992.jpg: detected 0 instances in 0.35s

It shows that no instances are found in the picture, namely no sheep is found. Does anyone know where is wrong?

KainingYing commented 3 years ago

Same problem . When i use the BoxInst_MS_R_101_BiFPN_dcni3_3x.pth to inference single image. I got the same problem. `ssh://zpf@10.12.41.181:22/home/zpf/miniconda3/envs/adet/bin/python -u /home/zpf/Desktop/ykn/IS/WSIS/AdelaiDet/demo/demo.py --config-file configs/BoxInst/MS_R_101_BiFPN_dcni3_3x.yaml --input demo/zion.jpg --output visualizations/Box_r101_zion.jpg --opts MODEL.WEIGHTS ./checkpoints/BoxInst_MS_R_101_BiFPN_dcni3_3x.pth [04/07 21:41:17 detectron2]: Arguments: Namespace(confidence_threshold=0.3, config_file='configs/BoxInst/MS_R_101_BiFPN_dcni3_3x.yaml', input=['demo/zion.jpg'], opts=['MODEL.WEIGHTS', './checkpoints/BoxInst_MS_R_101_BiFPN_dcni3_3x.pth'], output='visualizations/Box_r101_zion.jpg', video_input=None, webcam=False) WARNING [04/07 21:41:17 d2.config.compat]: Config 'configs/BoxInst/MS_R_101_BiFPN_dcni3_3x.yaml' has no VERSION. Assuming it to be compatible with latest v2. 0%| | 0/1 [00:00<?, ?it/s]error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function error in modulated_deformable_im2col_cuda: invalid device function /home/zpf/Desktop/ykn/IS/WSIS/AdelaiDet/adet/modeling/fcos/fcos_outputs.py:484: UserWarning: This overload of nonzero is deprecated: nonzero() Consider using one of the following signatures instead: nonzero(*, bool as_tuple) (Triggered internally at /opt/conda/conda-bld/pytorch_1595629403081/work/torch/csrc/utils/python_arg_parser.cpp:766.) per_candidate_nonzeros = per_candidate_inds.nonzero() [04/07 21:41:29 detectron2]: demo/zion.jpg: detected 0 instances in 1.22s 100%|█████████████████████████████████████████████| 1/1 [00:01<00:00, 1.39s/it]

Process finished with exit code 139 `

tianzhi0549 commented 3 years ago

This may be because you are using an older CUDA version. Upgrading your CUDA may solve the issue.

kaixin-bai commented 3 years ago

This may be because you are using an older CUDA version. Upgrading your CUDA may solve the issue.

Thanks for the reply! The CUDA version on my computer is 10.1. Since I don't have sudo on this computer, I cannot update the CUDA version. Is there another solution to fix this? Thanks!

tianzhi0549 commented 3 years ago

@kaixin-bai The discussion here (https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch/issues/13) might be helpful.

jingzhaohlj commented 3 years ago

Same problem. python demo/demo.py --config-file configs/CondInst/MS_R_101_3x_sem.yaml --input output/3.jpg output/4.jpg TEST/2151_34339_304_178_0.jpg --output output/condinst_MS_R_101_3x_sem/ --opts MODEL.WEIGHTS output/condinst_MS_R_101_3x_sem/model_0004999.pth

[07/13 15:34:05 detectron2]: Arguments: Namespace(confidence_threshold=0.3, config_file='configs/CondInst/MS_R_101_3x_sem.yaml', input=['output/3.jpg', 'output/4.jpg', 'TEST/2151_34339_304_178_0.jpg'], opts=['MODEL.WEIGHTS', 'output/condinst_MS_R_101_3x_sem/model_0004999.pth'], output='output/condinst_MS_R_101_3x_sem/', video_input=None, webcam=False) WARNING [07/13 15:34:05 d2.config.compat]: Config 'configs/CondInst/MS_R_101_3x_sem.yaml' has no VERSION. Assuming it to be compatible with latest v2. 0%| | 0/3 [00:00<?, ?it/s]/home/zhaojing/anaconda3/envs/AdelaiDet-master/lib/python3.8/site-packages/torch/_tensor.py:575: UserWarning: floor_divide is deprecated, and will be removed in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). (Triggered internally at /opt/conda/conda-bld/pytorch_1623448278899/work/aten/src/ATen/native/BinaryOps.cpp:467.) return torch.floor_divide(self, other) /home/zhaojing/anaconda3/envs/AdelaiDet-master/lib/python3.8/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 /opt/conda/conda-bld/pytorch_1623448278899/work/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) [07/13 15:34:11 detectron2]:output/3.jpg: detected 0 instances in 0.84s 33%|████████████████████████████████▋ | 1/3 [00:00<00:01, 1.13it/s][07/13 15:34:11 detectron2]: output/4.jpg: detected 0 instances in 0.15s 67%|█████████████████████████████████████████████████████████████████▎ | 2/3 [00:01<00:00, 1.81it/s][07/13 15:34:12 detectron2]: TEST/2151_34339_304_178_0.jpg: detected 0 instances in 0.12s 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 2.24it/s]

Harry-zzh commented 2 years ago

Same problem. python demo/demo.py --config-file configs/CondInst/MS_R_101_3x_sem.yaml --input output/3.jpg output/4.jpg TEST/2151_34339_304_178_0.jpg --output output/condinst_MS_R_101_3x_sem/ --opts MODEL.WEIGHTS output/condinst_MS_R_101_3x_sem/model_0004999.pth

[07/13 15:34:05 detectron2]: Arguments: Namespace(confidence_threshold=0.3, config_file='configs/CondInst/MS_R_101_3x_sem.yaml', input=['output/3.jpg', 'output/4.jpg', 'TEST/2151_34339_304_178_0.jpg'], opts=['MODEL.WEIGHTS', 'output/condinst_MS_R_101_3x_sem/model_0004999.pth'], output='output/condinst_MS_R_101_3x_sem/', video_input=None, webcam=False) WARNING [07/13 15:34:05 d2.config.compat]: Config 'configs/CondInst/MS_R_101_3x_sem.yaml' has no VERSION. Assuming it to be compatible with latest v2. 0%| | 0/3 [00:00<?, ?it/s]/home/zhaojing/anaconda3/envs/AdelaiDet-master/lib/python3.8/site-packages/torch/_tensor.py:575: UserWarning: floor_divide is deprecated, and will be removed in a future version of pytorch. It currently rounds toward 0 (like the 'trunc' function NOT 'floor'). This results in incorrect rounding for negative values. To keep the current behavior, use torch.div(a, b, rounding_mode='trunc'), or for actual floor division, use torch.div(a, b, rounding_mode='floor'). (Triggered internally at /opt/conda/conda-bld/pytorch_1623448278899/work/aten/src/ATen/native/BinaryOps.cpp:467.) return torch.floor_divide(self, other) /home/zhaojing/anaconda3/envs/AdelaiDet-master/lib/python3.8/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 /opt/conda/conda-bld/pytorch_1623448278899/work/c10/core/TensorImpl.h:1156.) return torch.max_pool2d(input, kernel_size, stride, padding, dilation, ceil_mode) [07/13 15:34:11 detectron2]:output/3.jpg: detected 0 instances in 0.84s 33%|████████████████████████████████▋ | 1/3 [00:00<00:01, 1.13it/s][07/13 15:34:11 detectron2]: output/4.jpg: detected 0 instances in 0.15s 67%|█████████████████████████████████████████████████████████████████▎ | 2/3 [00:01<00:00, 1.81it/s][07/13 15:34:12 detectron2]: TEST/2151_34339_304_178_0.jpg: detected 0 instances in 0.12s 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:01<00:00, 2.24it/s]

hi do you solve the problem?