Open doantientai opened 2 years ago
You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs";
One thing I'm wondering is that, in the output of collect_env.py
, we have
Compiler GCC 10.3
But when I do gcc --version
, it gives
gcc (Ubuntu 8.4.0-3ubuntu2) 8.4.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
One more detail, I have multiple version of CUDA and GCC and I manage them using sudo update-alternatives --config cuda
and sudo update-alternatives --config gcc
. I don't know if this may be the cause?
Exactly same issue here: ckbone.fpn_lateral5. | backbone.fpn_lateral5.{bias,weight} | (256,) (256,2048,1,1) | | backbone.fpn_output2. | backbone.fpn_output2.{bias,weight} | (256,) (256,256,3,3) | | backbone.fpn_output3. | backbone.fpn_output3.{bias,weight} | (256,) (256,256,3,3) | | backbone.fpn_output4. | backbone.fpn_output4.{bias,weight} | (256,) (256,256,3,3) | | backbone.fpn_output5. | backbone.fpn_output5.{bias,weight} | (256,) (256,256,3,3) | | proposal_generator.rpn_head.anchor_deltas. | proposal_generator.rpn_head.anchor_deltas.{bias,weight} | (12,) (12,256,1,1) | | proposal_generator.rpn_head.conv. | proposal_generator.rpn_head.conv.{bias,weight} | (256,) (256,256,3,3) | | proposal_generator.rpn_head.objectness_logits. | proposal_generator.rpn_head.objectness_logits.{bias,weight} | (3,) (3,256,1,1) | | roi_heads.box_head.fc1. | roi_heads.box_head.fc1.{bias,weight} | (1024,) (1024,12544) | | roi_heads.box_head.fc2. | roi_heads.box_head.fc2.{bias,weight} | (1024,) (1024,1024) | | roi_heads.mask_head.deconv. | roi_heads.mask_head.deconv.{bias,weight} | (256,) (256,256,2,2) | | roi_heads.mask_head.mask_fcn1. | roi_heads.mask_head.mask_fcn1.{bias,weight} | (256,) (256,256,3,3) | | roi_heads.mask_head.mask_fcn2. | roi_heads.mask_head.mask_fcn2.{bias,weight} | (256,) (256,256,3,3) | | roi_heads.mask_head.mask_fcn3. | roi_heads.mask_head.mask_fcn3.{bias,weight} | (256,) (256,256,3,3) | | roi_heads.mask_head.mask_fcn4.* | roi_heads.mask_head.mask_fcn4.{bias,weight} | (256,) (256,256,3,3) | WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.bias' to the model due to incompatible shapes: (4,) in the checkpoint but (320,) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.weight' to the model due to incompatible shapes: (4, 1024) in the checkpoint but (320, 1024) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.bias' to the model due to incompatible shapes: (2,) in the checkpoint but (81,) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.weight' to the model due to incompatible shapes: (2, 1024) in the checkpoint but (81, 1024) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.mask_head.predictor.bias' to the model due to incompatible shapes: (1,) in the checkpoint but (80,) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.mask_head.predictor.weight' to the model due to incompatible shapes: (1, 256, 1, 1) in the checkpoint but (80, 256, 1, 1) in the model! You might want to double check if this is expected. WARNING [08/29 07:34:11 fvcore.common.checkpoint]: Some model parameters or buffers are not found in the checkpoint: roi_heads.box_predictor.bbox_pred.{bias, weight} roi_heads.box_predictor.cls_score.{bias, weight} roi_heads.mask_head.predictor.{bias, weight} 0% 0/1 [00:00<?, ?it/s]/usr/local/lib/python3.7/dist-packages/torch/functional.py:478: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:2894.) return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined] [08/29 07:34:12 detectron2]: /content/dataset/test/DSC00280.JPG: detected 0 instances in 1.55s
I know that it is the config file doesn't match our trained model, " incompatible shapes: (1, 256, 1, 1) in the checkpoint but (80, 256, 1, 1) ", the 1 should be my one class target, but the 80 should be coco dataet with 80 classes, based on my knowledge. But i failed to solve it. I have tried added the : cfg.MODEL.ROI_HEADS.NUM_CLASSES = 1 predictor = DefaultPredictor(cfg)
But no luck.
Update: I can use the my own trained weight to see the segmentation results using:
IMAGE_DIR='/content/dataset/test' file_names = os.listdir(IMAGE_DIR)
for file_names in os.listdir(IMAGE_DIR):
#print(os.path.basename(d["file_name"]))
im = cv2.imread(os.path.join(IMAGE_DIR, file_names))
outputs = predictor(im) # format is documented at https://detectron2.readthedocs.io/tutorials/models.html#model-output-format
v = Visualizer(im[:, :, ::-1],
metadata=my_val_metadata,
scale=0.5,
instance_mode=ColorMode.IMAGE
#instance_mode=ColorMode.IMAGE_BW
# ColorMode.IMAGE_BW remove the colors of unsegmented pixels. This option is only available for segmentation models
)
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
cv2_imshow(out.get_image()[:, :, ::-1])
all instances were correct, but when i test the same image with python demo.py, I got 0 instances. Just want to figure it out where i might get wrong
I'm also facing the same issue. Any update on this?
I'm also facing the same issue. Any update on this?
I'm facing the same issue.
[0m[Checkpointer] Loading from C:\Users\xxx/.torch/iopath_cache\detectron2/ImageNetPretrained/MSRA\R-50.pkl ... [32m[08/02 11:12:53 d2.checkpoint.c2_model_loading]: [0mRenaming Caffe2 weights ...... [32m[08/02 11:12:53 d2.checkpoint.c2_model_loading]: [0mFollowing weights matched with submodule backbone.bottom_up - Total num: 54 [5m[31mWARNING[0m [32m[08/02 11:12:58 fvcore.common.checkpoint]: [0mSome model parameters or buffers are not found in the checkpoint:
In my case, I find that the checkpoint seem not loading. so I put model pkl file to C:/Users/.torch/iopath_cache/detectron2/ImageNetPretrained/MSRA/ and name it R-50.pkl then it works.
hope it helps.
Hi everyone,
I followed the instructions in here for the installation. Things went well. But then I tried running the first demo. The model did not detect any object.
I have made no change to the code.
Instructions To Reproduce the Issue:
And this is the Full logs of what I got
Expected behavior:
The model is expected to detect objects as being shown in the Colaboratory example with multiple detected objects.
Environment:
Hopefully someone know how to fix this. Thanks a lot for your attetion! :smiley: