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

Error trying to export models to caffe2 #12

Open
9thDimension opened this issue May 17, 2020 · 0 comments
Open

Error trying to export models to caffe2 #12

9thDimension opened this issue May 17, 2020 · 0 comments

Comments

@9thDimension
Copy link

When I try to run the standard caffe2 export script, I get an error:

(detectron_env_2) sal9000@sal9000-XPS-13-9370:~/Sources/detectron2/tools/deploy$ ./caffe2_converter_guitars.py --config-file /home/sal9000/Sources/detectron2/projects/vovnet-detectron2/checkpoints/MRCN-V2-19-FPNLite-3x/config.yaml  --output ./caffe2_model_guitars_lite --run-eval MODEL.WEIGHTS /home/sal9000/Sources/detectron2/projects/vovnet-detectron2/checkpoints/MRCN-V2-19-FPNLite-3x/model_final.pth  MODEL.DEVICE cpu
[05/17 15:15:55 detectron2]: Command line arguments: Namespace(config_file='/home/sal9000/Sources/detectron2/projects/vovnet-detectron2/checkpoints/MRCN-V2-19-FPNLite-3x/config.yaml', format='caffe2', opts=['MODEL.WEIGHTS', '/home/sal9000/Sources/detectron2/projects/vovnet-detectron2/checkpoints/MRCN-V2-19-FPNLite-3x/model_final.pth', 'MODEL.DEVICE', 'cpu'], output='./caffe2_model_guitars_lite', run_eval=True)
Traceback (most recent call last):
  File "./caffe2_converter_guitars.py", line 81, in <module>
    torch_model = build_model(cfg)
  File "/home/sal9000/Sources/detectron2/detectron2/modeling/meta_arch/build.py", line 21, in build_model
    model = META_ARCH_REGISTRY.get(meta_arch)(cfg)
  File "/home/sal9000/Sources/detectron2/detectron2/modeling/meta_arch/rcnn.py", line 32, in __init__
    self.backbone = build_backbone(cfg)
  File "/home/sal9000/Sources/detectron2/detectron2/modeling/backbone/build.py", line 31, in build_backbone
    backbone = BACKBONE_REGISTRY.get(backbone_name)(cfg, input_shape)
  File "/home/sal9000/virtualenvs/detectron_env_2/lib/python3.6/site-packages/fvcore/common/registry.py", line 70, in get
    "No object named '{}' found in '{}' registry!".format(name, self._name)
KeyError: "No object named 'build_vovnet_fpn_backbone' found in 'BACKBONE' registry!"

I had already inserted a line to add_vovnet_config(cfg), which fixed an earlier error, but I'm not sure how to proceed with this missing backbone error.

P.S. which is the fastest backbone for CPU inference? Eventually I'd like to try putting this model on a mobile device.

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

1 participant