Code Monkey home page Code Monkey logo

Comments (7)

abhijithrb avatar abhijithrb commented on August 19, 2024

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.

dpressel avatar dpressel commented on August 19, 2024

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.

abhijithrb avatar abhijithrb commented on August 19, 2024

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.

nuptwuchen avatar nuptwuchen commented on August 19, 2024

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.

sxhysj avatar sxhysj commented on August 19, 2024

I manage to make it faster by applying TensorFlow-Serving-API and i suggest you to do so.

from rude-carnie.

nuptwuchen avatar nuptwuchen commented on August 19, 2024

thanks

from rude-carnie.

lidan528 avatar lidan528 commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.