Comments (7)
I figured out the issue. In the utils.py, there are Ops that get added to the graph with each iteration of the loop in both the "crop_batch" functions, which led to an increase in memory usage. I solved it by restructuring the "ImageCoder" class such that the ops are added to the graph just once.
@dpressel I'm closing this issue if that's okay!
from rude-carnie.
Hi, sorry I did not get back to you sooner, have been swamped. I would consider merging a PR if you have something that solves the issue cleanly.
from rude-carnie.
Hello,
I have forked your project and made the changes to my repository.
The master branch is modified to suit my application to run both age and gender models in the same program and takes care of the memory issue as well. The second branch runs the same way your project runs but takes care of the memory issue. The major changes are in the utils.py file.
I'll make a PR for the second branch.
from rude-carnie.
Its sad to say the execution time is still add ( little ) when I try to run guess.py for a batch of images. I am try ing to solve it, however I am not do well in it. My computer is two titian-xp, it still cost 1s to comput a pic (gender) in the beginning, how can i do fast, because i have to deal a huge image data.
from rude-carnie.
I manage to make it faster by applying TensorFlow-Serving-API and i suggest you to do so.
from rude-carnie.
thanks
from rude-carnie.
Hi @dpressel ,
First of, thank you for this amazing project!
Coming to my issue, when I try running guess.py for a batch of images, the memory and execution time increases for each image. I checked memory using the 'top' and noticed the memory and cpu usage would constantly increase and eventually the program would crash.
I did a bit of digging and found this link where mrry suggests tcmalloc. I also came across couple of other links where this has been suggested but this didn't seem to make a difference.
Any ideas as to how to solve this?
Many thanks! I had the same problem and fixed it thanks to your inspiration. By the way, your modified code of "utils.py" remains a small probelm: missed the standardize_image operation after flip operation
from rude-carnie.
Related Issues (20)
- where is the folder /AgeGenderDeepLearning/Folds/tf/age_test_fold_is_1/run-20854 ? HOT 1
- how to use the guess.py with pre-trained model ? HOT 4
- how to change the script if I use MTCNN to detect the face ? HOT 4
- no gender in output HOT 1
- Using the gender detection model on tf 2.0 HOT 2
- Issue Training Gender HOT 2
- Where is the pruning process for the Tensorflow code?
- Running in Realtime
- Adding a licence
- name 'ImageCoder' is not defined HOT 2
- Cannot work on GPU and ask for Requirements
- Gender Classification Confusion Matrix
- batch size issue when freeze the graph
- python train.py HOT 2
- eval.py display accuracy
- test datasets HOT 1
- Custom Face Detector HOT 3
- Gender detection does not work correctly HOT 1
- Output node name to create a frozen graph
- who has the dataset ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rude-carnie.