mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

[Feature] How to add more information to outputs when converting to onnx and trt format?

Open goldentimecoolk opened this issue 2 years ago • 2 comments

Motivation

Hi, I want to fetch more outputs from the pretrained pytorch model. For example, I want to add the features from backbone and the embeddings from encoder to the final outputs. Apart from the output_nams in onnx_config = dict(output_names=['dets', 'labels'], input_shape=None) and its related dynamic_axes if necessary, where should I make modications, such as the inference interface?

Related resources

No response

Additional context

The base model is the officially pretrained dino detector.

goldentimecoolk avatar Dec 14 '23 08:12 goldentimecoolk

Hi, you mean custom ops? maybe you can see this folder

https://github.com/open-mmlab/mmdeploy/tree/main/csrc/mmdeploy/backend_ops

FlamingoPg avatar Dec 18 '23 10:12 FlamingoPg

Hi @yinfan98, I think it is not the custom ops. I want to fetch more information other than dets and labels from the existing pretrained model.

goldentimecoolk avatar Dec 22 '23 07:12 goldentimecoolk