Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting DEXTR model to Inference Engine format #1237

Closed
AlexFridman opened this issue Mar 5, 2020 · 5 comments
Closed

Converting DEXTR model to Inference Engine format #1237

AlexFridman opened this issue Mar 5, 2020 · 5 comments
Labels
question Further information is requested

Comments

@AlexFridman
Copy link

Hello!

I'm going to fine-tune (hope this will help) a DEXTR model on my data and integrate it into CVAT.
Could you please guide me how to convert trained in PyTorch (DEXTR training code is only available in PyTorch) and replace current DEXTR model file with my own?

Thank you!

@bsekachev bsekachev added the question Further information is requested label Mar 6, 2020
@bsekachev
Copy link
Member

@AlexFridman

Hi, long time ago I've written a script to convert the model. It worked, but I am not sure it works now. Nevertheless you can investigate how conversion can be done.

You must install at least git, openvino, python, tensorflow, and keras and probably some minor packages.

I attached scripts as an archive. Just execute convert.sh.

arch.zip

@bsekachev
Copy link
Member

@AlexFridman

To replace a default model in CVAT, please consider modification of Dockerfile.

ENV WITH_DEXTR=${WITH_DEXTR}
ENV DEXTR_MODEL_DIR=${HOME}/dextr
RUN if [ "$WITH_DEXTR" = "yes" ]; then \
        mkdir ${DEXTR_MODEL_DIR} -p && \
        curl https://download.01.org/openvinotoolkit/models_contrib/cvat/dextr_model_v1.zip -o ${DEXTR_MODEL_DIR}/dextr.zip && \
        7z e ${DEXTR_MODEL_DIR}/dextr.zip -o${DEXTR_MODEL_DIR} && rm ${DEXTR_MODEL_DIR}/dextr.zip; \
    fi

Finally, DEXTR_MODEL_DIRis expected to specify a directory with dextr.bin and dextr.xml

@AlexFridman
Copy link
Author

Thank you, guys! If I'll manage to run it -- I'll write you back!

@AlexFridman
Copy link
Author

@bsekachev, could you please specify keras, tensorflow and pytorch version you used?
And what is networks package?

@AlexFridman AlexFridman reopened this Mar 6, 2020
@bsekachev
Copy link
Member

@AlexFridman

networks is https://github.com/scaelles/DEXTR-KerasTensorflow/tree/master/networks
Unfortunately I cannot help you with exact versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants