Remove transform layer in Faster RCNN (torchvision, onnx)

Hello to everyone,

This problem occurred after converting model to onnx for deploy.

Onnxruntime (for C#) can’t properly work with transform layer (There is a very big question why torchvision exports image/batch transformation as a layer?) Moreover because of this transformation, I have couldn’t convert model further to tensorRT.

As a solution, I would like to remove transform layer from Faster Rcnn torchvision model. Is there any solution to do that without constructing model from scratch?

Kind regards,

Bulat.

Did you find an answer for this? Currently facing the same issue