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

Inference on own selected images #3

Open
AlbertoMCS opened this issue Sep 22, 2019 · 3 comments
Open

Inference on own selected images #3

AlbertoMCS opened this issue Sep 22, 2019 · 3 comments

Comments

@AlbertoMCS
Copy link

Hi,

Thanks for the repo, it is been very useful.

I properly trained the Mapillary dataset with your model and I would like to inference some images. I saw in the code that vis.py enables to do that but just val and train split images are possible to inference.

I would like to be able to select a bunch of images on my own and apply the model to do inference as we do with vis.py on the val split. Is there a way to do that without changing massively the code?

Thank you very much,
Regards,
Alberto.

@parachutel
Copy link
Owner

I tried doing this before, but with no success (I didn't try hard and spend much time though). Running vis.py on you own dataset without changing much code is definitely possible. I think you will need to create a new split and build your own data into tfrecord and get the upper bounds of the dimensions. (Or you can simply put your own images into the val split and run vis on that.)

@dbala31
Copy link

dbala31 commented Oct 29, 2019

I have successfully implemented inference of this model. (thank you Sheng Li for your Repo that helped me train with Mapillary). After checkpoint generation, convert to frozen model using 'stock' export_model.py DeeplabV3+ script (https://github.com/tensorflow/models/tree/master/research/deeplab). Some minimal code changes are required in the 'stock' model.py and common.py before converting. Look for errors during conversion, fix them (most are easy, like backbone name, Atrous rates, Decoder etc.,). When choosing backbone, I hardcoded that script line to xception/MobileNet instead of script picking it up from options list.
Once frozen use, https://github.com/tensorflow/models/blob/master/research/deeplab/deeplab_demo.ipynb for inference. You have to set the input size, classes, label_names and your own frozen.pb

@dbala31
Copy link

dbala31 commented Oct 29, 2019

Shameless plug, please see this youtube video that I had created for a competition with Mapillary/DeeplabV3+. Mr. Li, I have cited your work on the paper, could not squeeze it into the video due to time restrictions and rules.
https://youtu.be/bQH4Bep4sJg

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

No branches or pull requests

3 participants