Git Product home page Git Product logo

Comments (6)

rcrvano avatar rcrvano commented on September 17, 2024

Please check this issue
pmh47/dirt#16

Paul Henderson (the dirt developer) give me this solution:

I reproduced this on a similar configuration; the issue is indeed with using too much memory. Octopus doesn't use allow_growth, so tensorflow grabs all the GPU memory, which leaves DIRT unable to perform its own small allocations. You can patch octopus with the following:

diff --git a/infer_single.py b/infer_single.py
index bfcb292..3a02d8f 100644
--- a/infer_single.py
+++ b/infer_single.py
@@ -6,6 +6,8 @@ from glob import glob
 from lib.io import openpose_from_file, read_segmentation, write_mesh
 from model.octopus import Octopus
 
+import tensorflow as tf
+
 
 def main(weights, name, segm_dir, pose_dir, out_dir, opt_pose_steps, opt_shape_steps):
     segm_files = sorted(glob(os.path.join(segm_dir, '*.png')))
@@ -14,6 +16,8 @@ def main(weights, name, segm_dir, pose_dir, out_dir, opt_pose_steps, opt_shape_s
     if len(segm_files) != len(pose_files) or len(segm_files) == len(pose_files) == 0:
         exit('Inconsistent input.')
 
+    tf.keras.backend.set_session(tf.Session(config=tf.ConfigProto(gpu_options=tf.GPUOptions(allow_growth=True))))
+
     model = Octopus(num=len(segm_files))
     model.load(weights)

And all works fine at me. Please add this patch to the octopus code for works with GPU cards with more than 10GB memory.

from octopus.

thmoa avatar thmoa commented on September 17, 2024

DIRT is not part of this project. Please open a ticket at the DIRT project.
If this option improves this project, please submit a pull request.

from octopus.

rcrvano avatar rcrvano commented on September 17, 2024

The fixes should be made in the Octopus code:

file infer_single.py:

import tensorflow as tf

and add inside main function :

tf.keras.backend.set_session(tf.Session(config=tf.ConfigProto(gpu_options=tf.GPUOptions(allow_growth=True))))

Please read his anwer

I reproduced this on a similar configuration; the issue is indeed with using too much memory. Octopus doesn't use allow_growth, so tensorflow grabs all the GPU memory, which leaves DIRT unable to perform its own small allocations. You can patch octopus with the following:

from octopus.

thmoa avatar thmoa commented on September 17, 2024

Please feel free to submit a pull request.

from octopus.

rcrvano avatar rcrvano commented on September 17, 2024

Now all works fine. Thanks!

from octopus.

OOF-dura avatar OOF-dura commented on September 17, 2024

Now all works fine. Thanks!

hi~ Could you share your pkg version? Are you using tf1.13.1?

from octopus.

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.