question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

how to loading a mmdetection model in C++

See original GitHub issue

I train the cascade-rcnn by mmdetection and get a model, now I want to use this model to inference by C++. So I convert this model by: trace_script_module = torch.jit.trace(model, example_input) trace_script_module.save(result_file)

In general, example_input is a array to simulate an image. But I find that mmdetection model doesn’t use numpy array as the input, it uses the following code to inference: result = model(return_loss=False, rescale=True, **data)

How should I simulate example_input? Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
ZHEQIUSHUIcommented, Dec 4, 2019

because there are many customOp in mmdetection

sounds like a huge and difficult project… I have deploy classification and segmentation model in c++ and windows, but deploy detection model is so difficult.

you can try https://github.com/ruinmessi/RFBNet ,this detection model is very easy to deploy in C++

0reactions
xsachacommented, Jul 12, 2021

Requires just a small patch to forward() to have default argument of img_metas=None and then if img_metas is None return simple_test

Read more comments on GitHub >

github_iconTop Results From Across the Web

latest PDF - MMDetection's documentation!
When installing PyTorch, you need to specify the version of CUDA. If you are not clear on which to choose, follow our recommendations:....
Read more >
MMDetection Tutorial - | notebook.community
Perform inference with a MMDet detector. MMDetection already provides high level APIs to do inference and training. In [4]: !mkdir checkpoints !wget -c...
Read more >
MMDetection Tutorial — An End2End State-of-the-art Object ...
The next thing to do is to open up the repository files and navigate to the “configs” directory. In the configs directory, you...
Read more >
Object Detection using mmdetection | by Ravi Singh | Medium
Mmdetection has three main folders:- Configs: It has all the configuration files, where you tell the model, location of the data, ...
Read more >
Getting Started with MMDetection Training for Object Detection
Download the Pretrained Weights ; parse_meta_file() · Function to parse all the model meta files inside `mmdetection/configs` ; model_name) · Either ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found