Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Converting e2e_faster_rcnn_X_101_32x8d_FPN_1x_caffe2.pkl to protobuf #24

Closed
karanchawla opened this issue Oct 26, 2018 · 5 comments
Closed
Labels
invalid This doesn't seem right

Comments

@karanchawla
Copy link

❓ Questions and Help

Do we use the Detectron's script to convert the pkl config files to protobuf for C++ deployment?

I'm getting the following error when I try to convert the aforementioned file using that python script:

(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
@fmassa
Copy link
Contributor

fmassa commented Oct 26, 2018

Hi,

Could you expand on what you are trying to do?
It's not very clear to me.

Thanks!

@karanchawla
Copy link
Author

I'm trying to run this model as part of a C++ project and was attempting to convert the pkl file to a pytorch model file, however, being new to pytorch I wasn't sure how to proceed with this. So, I was trying to use Detectron's script for converting the model to protobuf. Do you have any pointers for that?

@fmassa
Copy link
Contributor

fmassa commented Oct 29, 2018

Hi,

If you want to use Detectron for C++ deployment, you should ask your questions in https://github.com/facebookresearch/Detectron, as they will be in a better position to help you.

That being said, I will at some point add support for exporting PyTorch models into C++ using new functionality from PyTorch 1.0. But it might still take a few weeks for that.

Given that this doesn't look like a question / issue with maskrcnn-benchmark, I'm closing this issue.

@fmassa fmassa closed this as completed Oct 29, 2018
@fmassa fmassa added invalid This doesn't seem right and removed awaiting response labels Oct 29, 2018
@karanchawla
Copy link
Author

Hi, thanks! Sorry, if I miscommunicated, I meant I have been trying to deploy maskrcnn-benchmark on C++ but since I didn't find any tools to convert the models to C++ compatible format, I tried using the tools provided with Detectron.

I see, could you point me to how I should go about deploying this on C++? Maybe I can implement it and open a PR?

Thanks!

@fmassa fmassa reopened this Oct 29, 2018
@fmassa
Copy link
Contributor

fmassa commented Oct 29, 2018

Hi,

I indeed misunderstood your question.

I'll be looking into supporting jit tracing in the future. This will probably involve modifying the way I use C++ extensions.
This means that it will be possible to have maskrcnn-benchmark running in standalone C++ apps.

I can send you some pointers on how to approach that, but I don't have all the answers ahead of time, and there might be some subtle issues that might require some digging.

I'm currently tracking this issue in #27, so to avoid duplicates I'll be closing this issue. Let's continue the discussion there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants