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

Using the gender detection model on tf 2.0 #104

Open
aayushbhaskar opened this issue Apr 30, 2020 · 2 comments
Open

Using the gender detection model on tf 2.0 #104

aayushbhaskar opened this issue Apr 30, 2020 · 2 comments

Comments

@aayushbhaskar
Copy link

Hi, I want to use the gender detection model using tensorflow 2.x. I already have a script to extract faces with a fairly high accuracy, I just want to use the gender detection model using inception v3. Can you please help. I cannot use tensorflow 1.x because my project has many other functionalities, and every other model is written in tf 2.x.

@dpressel
Copy link
Owner

Not sure if you are trying to run in declarative or eager mode, in 2 eager is default. In general 2.x is a major departure from 1.x and the code will not run even in declarative mode without modifications to use tf.compat.v1 namespaces. If you want to make that change it may just then work. If so, send a PR. I think this tool can probably help you upgrade https://www.tensorflow.org/guide/upgrade

But I haven’t tried it

Otherwise for inference you could export the model for TF serving. I’m not sure your pipeline so maybe it doesn’t make sense here.

In general, this code was developed in 2016 and the TF API has significantly improved since then (including the datasets API and its multiworker handling). So I want to do a major overhaul for 2.x soon but I haven’t had a lot of free cycles ATM and I don’t have a timeline yet.

@aayushbhaskar
Copy link
Author

Okay, I may try using the tensorflow code migration method. Do you think the model will still load if the code is changed?

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

2 participants