python3.7 demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml --input input1.jpg input2.jpg --opts MODEL.WEIGHTS /media/ion/ioNdrive/detectron2/weights/model_final_a54504.pkl
[04/21 13:12:35 detectron2]: Arguments: Namespace(confidence_threshold=0.5, config_file='../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_1x.yaml', input=['input1.jpg', 'input2.jpg'], opts=['MODEL.WEIGHTS', '/media/ion/ioNdrive/detectron2/weights/model_final_a54504.pkl'], output=None, video_input=None, webcam=False)
[04/21 13:12:38 fvcore.common.checkpoint]: Loading checkpoint from /media/ion/ioNdrive/detectron2/weights/model_final_a54504.pkl
[04/21 13:12:38 fvcore.common.checkpoint]: Reading a file from 'Detectron2 Model Zoo'
[04/21 13:12:38 fvcore.common.checkpoint]: Some model parameters are not in the checkpoint:
pixel_std
pixel_mean
Traceback (most recent call last):
File "demo.py", line 79, in <module>
demo = VisualizationDemo(cfg)
File "/media/ion/ioNdrive/detectron2/demo/predictor.py", line 35, in __init__
self.predictor = DefaultPredictor(cfg)
File "/media/ion/ioNdrive/detectron2/detectron2/engine/defaults.py", line 185, in __init__
checkpointer.load(cfg.MODEL.WEIGHTS)
File "/home/ion/.local/lib/python3.7/site-packages/fvcore/common/checkpoint.py", line 104, in load
self._load_model(checkpoint)
File "/media/ion/ioNdrive/detectron2/detectron2/checkpoint/detection_checkpoint.py", line 68, in _load_model
incompatible.missing_keys.remove(k)
AttributeError: 'NoneType' object has no attribute 'missing_keys'
super()._load_model(checkpoint)
Thank you very much.
best regards,
Albert Christianto
You need the latest version of fvcore.
hi, @ppwwyyxx.
thanks for the fast response.
what is the latest version of fvcore?
my fvcore version is '0.1.dev200420'. I followed the detectron2 readme installation, so it didn't install the latest version?
thank you very much.
best regards,
Albert Christianto
You actually need latest version from github: https://github.com/facebookresearch/fvcore#3-install-from-github
It seems the latest package hasn't been uploaded yet
Hi @ppwwyyxx
yes, you are right the latest version of fvcore hasn't been uploaded yet.
I have installed the latest version of fvcore from github and it works very well.
thank you very much for your tips and hospitality.
best regards,
Albert Christianto
update: the latest master of detectron2 (273e3b9746473a7469550bf793bbfb4c0a47c7d5) should work with older version of fvcore (at the cost of extra warnings)
Most helpful comment
You need the latest version of fvcore.