Coder Social home page Coder Social logo

Comments (10)

gangyahaidao avatar gangyahaidao commented on May 18, 2024 1

thank you for your reply, i run this cmd:
python3 -c 'import tensorflow as tf; print(tf.__version__)'
output: 1.4.0
maybe it's version mismatch, i will try to fix it and show the result

from handtracking.

namheegordonkim avatar namheegordonkim commented on May 18, 2024 1

You can copy it to the current directory and use it as follows

No you can't! Like @TyrionZK mentions you need to install Tensorflow object detection API. Do you have instructions for doing so?

from handtracking.

victordibia avatar victordibia commented on May 18, 2024

This error looks like the same in issue #1 .
It appears to be an error associated with different tensorflow versions.
The solution is to generate your own frozen graph from the model checkpoint I provide.

See issue #1 for more details.

-V.

from handtracking.

gangyahaidao avatar gangyahaidao commented on May 18, 2024

after i reinstall tensor-flow v1.4.0-rc0, it works fine! thanks@victordibia
but i got such errors, when startup comes up CUDA_ERROR_OUT_OF_MEMORY

`rosrobot@rosrobot:~/git/handtracking$ python3 detect_multi_threaded.py
{'num_hands_detect': 2, 'score_thresh': 0.2, 'im_height': 180.0, 'im_width': 320.0} Namespace(display=1, fps=1, height=200, num_hands=2, num_workers=4, queue_size=5, video_source=0, width=300)
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
2018-03-28 16:09:03.123319: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.123576: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.123690: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.124384: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124405: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.124661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124677: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.124862: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124896: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.126570: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 1.33G (1427963904 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-03-28 16:09:03.126752: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 1.33G (1427963904 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY

My question is how much GPU memory is required??It's obvious that my computer is too weak.

from handtracking.

victordibia avatar victordibia commented on May 18, 2024

from handtracking.

gangyahaidao avatar gangyahaidao commented on May 18, 2024

only use CPU, too slow? what's your fps?

from handtracking.

victordibia avatar victordibia commented on May 18, 2024

from handtracking.

TyrionZK avatar TyrionZK commented on May 18, 2024

after i reinstall tensor-flow v1.4.0-rc0, it works fine! thanks@victordibia
but i got such errors, when startup comes up CUDA_ERROR_OUT_OF_MEMORY

`rosrobot@rosrobot:~/git/handtracking$ python3 detect_multi_threaded.py
{'num_hands_detect': 2, 'score_thresh': 0.2, 'im_height': 180.0, 'im_width': 320.0} Namespace(display=1, fps=1, height=200, num_hands=2, num_workers=4, queue_size=5, video_source=0, width=300)
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
>> loading frozen model for worker
> ====== loading HAND frozen graph into memory
2018-03-28 16:09:03.123319: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.123576: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.123690: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-03-28 16:09:03.124384: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124405: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.124661: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124677: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.124862: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties: 
name: GeForce MX150 major: 6 minor: 1 memoryClockRate(GHz): 1.5315
pciBusID: 0000:01:00.0
totalMemory: 1.95GiB freeMemory: 1.55GiB
2018-03-28 16:09:03.124896: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce MX150, pci bus id: 0000:01:00.0, compute capability: 6.1)
2018-03-28 16:09:03.126570: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 1.33G (1427963904 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY
2018-03-28 16:09:03.126752: E tensorflow/stream_executor/cuda/cuda_driver.cc:936] failed to allocate 1.33G (1427963904 bytes) from device: CUDA_ERROR_OUT_OF_MEMORY

My question is how much GPU memory is required??It's obvious that my computer is too weak.

How to install tensor-flow v1.4.0-rc0 ? I can not find this version with conda. Thanks.

from handtracking.

victordibia avatar victordibia commented on May 18, 2024

Hi @TyrionZK

One way to solve this error is to generate a frozen graph (from the model checkpoint I provide ) using your current version of tensorflow.

The tensorflow object detection repo has a python file for this.

You can copy it to the current directory and use it as follows

python3 export_inference_graph.py \
    --input_type image_tensor \
    --model-checkpoint/ssd_mobilenet_v1_pets.config \
    --model-checkpoint/model.ckpt-200002 \ 
    --output_directory hand_inference_graph

from handtracking.

TyrionZK avatar TyrionZK commented on May 18, 2024

Firstly, thanks for your reply. @victordibia

I have try it as you say. But some error happens as below. Then I try to solve the error with some guide about how to install tensorflow object detection API. After 1 day, it doesn't work. Can you give me some detailed instuction ? I will very appreciate it.

Traceback (most recent call last):
File "export_inference_graph.py", line 96, in
from object_detection import exporter
File "D:\ProgramData\Anaconda3\envs\detect\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\exporter.py", line 20, in
from tensorflow.contrib.quantize.python import graph_matcher
ImportError: cannot import name 'graph_matcher'

My environment:
win7
anaconda3
python 3.6.6
tensorflow 1.4.0

from handtracking.

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.