Open lucasjinreal opened 5 years ago
Can we download the traced model or how do we traced c++ torch model from python repo?
@jinfagang
@lsrock1 Do u trace from maskrcnn-benmark, do you have any fork on how to trace it? I think only backbone and head would be enough for inference.
@jinfagang I am not sure this script is what you want. https://github.com/lsrock1/maskrcnn_benchmark.cpp/blob/master/python_utils/to_jit.py This python script saves weights separately. I loaded these files and merge in cpp.
Why do u save them separate? Does they can be traced into a single model?
I couldn't because of untracable logic. Even If model can be traced in single model, logics must be replaced with cpp implementation, code will be dirty. I will upload minimal code only for inference.
@lsrock1 can we just use the torch.jit.trace command to trace the maskrcnn detection model from torchvision? Had multiple issues while trying to do that. Did you try that already? A forward pass with the traced model should give the detections and masks as far as I understand. @jinfagang did you have any success in tracing from python trained weights to c++?
A minimal standalone forward c++ project would be better.
And directly trace model out using python branch.