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

0 instance detected #57

Open
frischzenger opened this issue Dec 11, 2020 · 7 comments
Open

0 instance detected #57

frischzenger opened this issue Dec 11, 2020 · 7 comments

Comments

@frischzenger
Copy link

i used COCO-InstanceSegmentation/mask_cascade_rcnn_ResNeSt_200_FPN_syncBN_all_tricks_3x.yaml this model but 0 instance detected,
this is test [image:](https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1607682904616&di=6b5afd1e92283f9170ebf4287c308263&imgtype=0&src=http%3A%2F%2Fimg11.360buyimg.com%2Fn1%2Fs350x449_jfs%2Ft2686%2F169%2F35030773%2F235194%2F3428fb86%2F56fcc929N2fb70bda.jpg%2521cc_350x449.jpg)

@frischzenger frischzenger changed the title Please read & provide the following 0 instance detected Dec 11, 2020
@frischzenger
Copy link
Author

and I test many other pictures, but also 0 instance detected

@frischzenger
Copy link
Author

and it hints some mode parameters are not in the checkpoint

@frischzenger
Copy link
Author

i also test other COCO-InstanceSegmentation models, but nothing detected, what's the problem?

@frischzenger
Copy link
Author

and i test official detectron2 it works well

@NVukobrat
Copy link

Hi @frischzenger, is there some specific reason you chose /mask_cascade_rcnn_ResNeSt_200_FPN_syncBN_all_tricks_3x.yaml?

The problem can possibly be with the wrong pair of the configuration files and/or weights. Can you post the full output?

Also, can you try to run following configuration:
mask_cascade_rcnn_ResNeSt_200_FPN_dcn_syncBN_all_tricks_3x.yaml

with these weights:
https://s3.us-west-1.wasabisys.com/resnest/detectron/mask_cascade_rcnn_ResNeSt_200_FPN_dcn_syncBN_all_tricks_3x-e1901134.pth

@mcwoojcik
Copy link

mcwoojcik commented Jan 19, 2021

Hello - I obtained a similar problem (it is similar for all ResNeSt variations 50, 101, 200 using cpu because CUDA out of memory):

python demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_cascade_rcnn_ResNeSt_101_FPN_syncBN_1x.yaml --input /home/kaczor/crop_test_yolact/multipla_/2b46bab5-52de-47b0-07f1-08d89a8f02c4.jpg --opts MODEL.DEVICE cpu

[01/19 16:57:05 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='../configs/COCO-InstanceSegmentation/mask_cascade_rcnn_ResNeSt_101_FPN_syncBN_1x.yaml', input=['/home/kaczor/crop_test_yolact/multipla_/2b46bab5-52de-47b0-07f1-08d89a8f02c4.jpg'], opts=['MODEL.DEVICE', 'cpu'], output=None, video_input=None, webcam=False)
[01/19 16:57:07 fvcore.common.checkpoint]: Loading checkpoint from https://s3.us-west-1.wasabisys.com/resnest/detectron/resnest101_detectron-486f69a8.pth
[01/19 16:57:07 fvcore.common.file_io]: Downloading https://s3.us-west-1.wasabisys.com/resnest/detectron/resnest101_detectron-486f69a8.pth ...
[01/19 16:57:07 fvcore.common.download]: Downloading from https://s3.us-west-1.wasabisys.com/resnest/detectron/resnest101_detectron-486f69a8.pth ...
resnest101_detectron-486f69a8.pth: 186MB [02:20, 1.32MB/s]                      
[01/19 16:59:28 fvcore.common.download]: Successfully downloaded /home/kaczor/.torch/fvcore_cache/resnest/detectron/resnest101_detectron-486f69a8.pth. 185563744 bytes.
[01/19 16:59:28 fvcore.common.file_io]: URL https://s3.us-west-1.wasabisys.com/resnest/detectron/resnest101_detectron-486f69a8.pth cached in /home/kaczor/.torch/fvcore_cache/resnest/detectron/resnest101_detectron-486f69a8.pth
[01/19 16:59:28 fvcore.common.checkpoint]: Some model parameters are not in the checkpoint:
  roi_heads.box_head.2.conv2.weight
  backbone.fpn_lateral2.norm.{running_var, bias, running_mean, weight}
  roi_heads.box_head.2.conv4.norm.{bias, weight, running_mean, running_var}
  backbone.fpn_output3.norm.{bias, running_mean, weight, running_var}
  roi_heads.box_predictor.2.bbox_pred.{weight, bias}
  proposal_generator.rpn_head.conv.{weight, bias}
  roi_heads.box_head.0.conv4.norm.{running_mean, running_var, weight, bias}
  backbone.fpn_output5.norm.{running_var, running_mean, bias, weight}
  roi_heads.box_head.0.conv2.norm.{running_var, running_mean, bias, weight}
  proposal_generator.rpn_head.anchor_deltas.{bias, weight}
  roi_heads.mask_head.predictor.{bias, weight}
  roi_heads.mask_head.mask_fcn4.norm.{bias, running_var, weight, running_mean}
  roi_heads.box_head.2.conv3.norm.{running_mean, weight, bias, running_var}
  roi_heads.box_head.0.conv3.weight
  roi_heads.box_head.1.conv4.norm.{running_mean, bias, weight, running_var}
  backbone.fpn_lateral5.weight
  backbone.fpn_output4.norm.{running_var, weight, bias, running_mean}
  roi_heads.box_predictor.0.bbox_pred.{bias, weight}
  backbone.fpn_lateral3.norm.{running_mean, bias, weight, running_var}
  roi_heads.box_head.1.fc1.{weight, bias}
  roi_heads.box_predictor.0.cls_score.{bias, weight}
  backbone.fpn_lateral5.norm.{weight, running_mean, running_var, bias}
  roi_heads.box_head.1.conv2.norm.{running_var, bias, weight, running_mean}
  roi_heads.box_head.2.conv2.norm.{running_mean, bias, weight, running_var}
  roi_heads.mask_head.mask_fcn1.weight
  roi_heads.box_head.1.conv3.norm.{running_mean, running_var, bias, weight}
  roi_heads.mask_head.mask_fcn3.norm.{running_var, weight, bias, running_mean}
  proposal_generator.anchor_generator.cell_anchors.{1, 0, 2, 3, 4}
  roi_heads.mask_head.mask_fcn2.weight
  roi_heads.box_head.0.conv3.norm.{weight, running_mean, bias, running_var}
  roi_heads.box_predictor.1.cls_score.{weight, bias}
  roi_heads.mask_head.deconv.{bias, weight}
  roi_heads.box_head.1.conv1.norm.{running_mean, running_var, weight, bias}
  roi_heads.box_head.0.conv1.norm.{weight, bias, running_mean, running_var}
  roi_heads.mask_head.mask_fcn1.norm.{weight, bias, running_var, running_mean}
  roi_heads.mask_head.mask_fcn2.norm.{weight, running_var, running_mean, bias}
  proposal_generator.rpn_head.objectness_logits.{weight, bias}
  backbone.fpn_lateral3.weight
  roi_heads.box_head.1.conv3.weight
  roi_heads.box_head.2.conv1.weight
  backbone.fpn_output2.norm.{running_mean, running_var, weight, bias}
  roi_heads.box_head.2.conv1.norm.{bias, running_mean, running_var, weight}
  backbone.fpn_lateral4.norm.{weight, running_mean, bias, running_var}
  roi_heads.box_predictor.2.cls_score.{bias, weight}
  roi_heads.box_head.1.conv2.weight
  roi_heads.box_head.2.conv4.weight
  roi_heads.box_head.1.conv4.weight
  roi_heads.box_head.0.fc1.{weight, bias}
  backbone.fpn_lateral4.weight
  roi_heads.box_head.2.conv3.weight
  roi_heads.box_head.0.conv4.weight
  backbone.fpn_output3.weight
  backbone.fpn_output5.weight
  backbone.fpn_output2.weight
  backbone.fpn_lateral2.weight
  roi_heads.mask_head.mask_fcn3.weight
  roi_heads.box_head.0.conv2.weight
  roi_heads.box_head.0.conv1.weight
  roi_heads.box_head.1.conv1.weight
  backbone.fpn_output4.weight
  roi_heads.box_predictor.1.bbox_pred.{weight, bias}
  roi_heads.mask_head.mask_fcn4.weight
  roi_heads.box_head.2.fc1.{weight, bias}
/home/kaczor/detectron2-ResNeSt/detectron2/modeling/roi_heads/fast_rcnn.py:107: UserWarning: This overload of nonzero is deprecated:
	nonzero()
Consider using one of the following signatures instead:
	nonzero(*, bool as_tuple) (Triggered internally at  /pytorch/torch/csrc/utils/python_arg_parser.cpp:882.)
  filter_inds = filter_mask.nonzero()
[01/19 16:59:45 detectron2]: /home/kaczor/crop_test_yolact/multipla_/2b46bab5-52de-47b0-07f1-08d89a8f02c4.jpg: detected 0 instances in 16.87s

I installed detectron2 using detectron2-ResNeSt repo by python -m pip install -e . command in detectron2-ResNeSt directory

OS: Ubuntu 18.04.5 LTS x64
PyTorch: 1.7.0+cu110
CUDA: 11.1
Python: 3.6.9
Run on cpu because CUDA out of memory RuntimeError by --opts MODEL.DEVICE cpu option

I'll be grateful for any hints about the possible reason or for the solution which will help me run inference successfully.
Best regards :)

@mcwoojcik
Copy link

I have the same problem using google COLAB - maybe I used wrong command in demo to run?

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

3 participants