python3 tools/demo.py \
--dataset coco_2017_val \
--ckpt outputs/Oct24-11-45-33/ckpt/model_step_20000.pth \
--mean_pixel 102.9801 115.9465 122.7717 \
--fit_window 800 1333 \
--video 0 \
--delay 1 \
--show_fps \
pytorch \
--model segmentoly.rcnn.model_zoo.resnet_fpn_mask_rcnn.ResNet50FPNMaskRCNN \
--show_flops
loading annotations into memory...
Done (t=0.03s)
creating index...
index created!
INFO 24-10-19 16:47:26 demo.py: 119] Dataset COCODataset
Number of datapoints: 3
Number of classes: 3
Transforms: Compose(
Resize[widow_size = [800, 1333]]
ToTensor
Normalize[mean = [102.9801, 115.9465, 122.7717], std = [1.0, 1.0, 1.0], rgb = False]
)
INFO 24-10-19 16:47:26 demo.py: 122] Using pytorch backend
INFO 24-10-19 16:47:26 demo.py: 124] Loading network...
WARNING 24-10-19 16:47:28 weights.py: 59] Model and checkpoint have different sizes of tensors in 'fpn.conv_top.weight': torch.Size([256, 2048, 1, 1]) vs torch.Size([128, 2048, 1, 1]). Weights will not b
e loaded
WARNING 24-10-19 16:47:28 weights.py: 59] Model and checkpoint have different sizes of tensors in 'fpn.conv_top.bias': torch.Size([256]) vs torch.Size([128]). Weights will not be loaded
(many similar warnings omitted...)
Traceback (most recent call last):
File "tools/demo.py", line 229, in <module>
main(args)
File "tools/demo.py", line 128, in main
load_checkpoint(net, args.checkpoint_file_path)
File "/media/thk/storage/sandbox_2019/gitlab_proj/openvino_training_extensions/pytorch_toolkit/instance_segmentation/segmentoly/utils/weights.py", line 53, in load_checkpoint
tensor = operator.attrgetter(name)(model)
File "/home/thk/.local/lib/python3.5/site-packages/torch/nn/modules/module.py", line 585, in __getattr__
type(self).__name__, name))
AttributeError: 'BboxHead' object has no attribute 'fc3'
I have tried to run
python3 tools/train_0050.pyof Instance Segmentation with a small new data set which has only 3 classes. The losses converged and I assumed that the training was successful. But when I tried to test the trained model with the following commands:It returned the following error message:
My questions:
pip3to uninstall but failed). The instruction of Instance Segmentation suggests PyTorch 0.4.1. Does the unmatched PyTorch version cause theAttributeError?The working system is Ubuntu 16.04.