Comments (11)
Did you notice any error when you export the model?
$ CUDA_VISIBLE_DEVICES=0 ./export.sh ssdlite_mobilenet_v2_egohands
from hand-detection-tutorial.
Yes I have below output, also i am aware that model_exported directory is empty
InvalidArgumentError (see above for traceback): Unsuccessful TensorSliceReader constructor: Failed to get matching files on ssdlite_mobilenet_v2_egohands/model.ckpt-20000: Not found: ssdlite_mobilenet_v2_egohands; No such file or directory [[Node: save/RestoreV2_139 = RestoreV2[dtypes=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_save/Const_0_0, save/RestoreV2_139/tensor_names, save/RestoreV2_139/shape_and_slices)]] [[Node: save/RestoreV2_108/_767 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_1582_save/RestoreV2_108", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:GPU:0"]()]]
from hand-detection-tutorial.
The error message says it could not find the model checkpoint file: 'ssdlite_mobilenet_v2_egohands/model.ckpt-20000'. Have you trained this 'ssdlite_mobilenet_v2_egohands' model by yourself? In case you are using a different model, say 'ssd_mobilenet_v1_egohands', be sure to use the correct model name for your own model.
from hand-detection-tutorial.
Thanks I thought I have trained few days ago, probably something I have missed.
Than, for now is it possible to use some other data with checkpoint files? for instance 'ssd_inception_v2_coco' has checkpoints, can the code be run with this dataset?
from hand-detection-tutorial.
The code would require some modification if you are not using egohands trained model for inferencing.
More specifically, if you want to use 'ssd_inception_v2_coco' for testing, you'd, for example, need to modify this line in detect_image.py to read the COCO label map file.
from hand-detection-tutorial.
Thanks for your help, now I can make the code work, I have one more question I did not bother to open issue I can open, if necessary? Is the code not working on GPU?
from hand-detection-tutorial.
The code does work for GPU. When you specify CUDA_VISIBLE_DEVICES=0
you are essentially asking tensorflow to use GPU #0 for the training or inferencing task.
from hand-detection-tutorial.
Thanks for your quick reply. Actually I have successfully got output for the image. Now I would like to call the code without using bash script, I have directly write CUDA_VISIBLE_DEVICES=0
just before detect_image
method and make command python detect_image.py
, in that case no activity appears on GPU and FPS is ~1. That is why I think it does not run on GPU, obviously I make something wrong.
from hand-detection-tutorial.
According to official documentation, tensorflow should prioritize and use the gpu unless requested otherwise.
If you'd like to specifically control which gpu or cpu to use for inferencing, you might try to modify this line of code: https://github.com/jkjung-avt/hand-detection-tutorial/blob/master/detect_image.py#L53
from hand-detection-tutorial.
Hi again,
What I was trying to do is to run the code with video input. I see that when the session is created in while loop constantly, the implementation gets really slow. I guess model is reloaded for every session create. That is why I thought gpu is not used (I am still clueless about why GPU utility was very low as 1-2%).
Anyhow, long story short, I get below part outside of while and now everything is ok, FPS ~25. Thanks for your work and help!
# load label map
category_index = label_map_util.create_category_index_from_labelmap(
PATH_TO_LABELS)
# load detection graph
detection_graph = tf.Graph()
with detection_graph.as_default():
od_graph_def = tf.GraphDef()
with tf.gfile.GFile(PATH_TO_FROZEN_GRAPH, 'rb') as fid:
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
tf.import_graph_def(od_graph_def, name='')
# define input/output tensors
image_tensor = detection_graph.get_tensor_by_name('image_tensor:0')
detection_boxes = detection_graph.get_tensor_by_name('detection_boxes:0')
detection_scores = detection_graph.get_tensor_by_name('detection_scores:0')
detection_classes = detection_graph.get_tensor_by_name('detection_classes:0')
num_detections = detection_graph.get_tensor_by_name('num_detections:0')
config = tf.ConfigProto(log_device_placement=True)
config.gpu_options.allow_growth = True
config.gpu_options.visible_device_list= '0'
config.log_device_placement=True
config.allow_soft_placement = True
sess = tf.Session(config=config, graph=detection_graph)
from hand-detection-tutorial.
Good to hear this. And you are very welcome.
from hand-detection-tutorial.
Related Issues (20)
- evel config HOT 1
- The training consume all my memory HOT 4
- Retraining custom object detector HOT 15
- 3.Run the installation script. Make sure the last step in the script HOT 1
- Can i train in python2 but applied in Jestson in Python3? HOT 1
- python prepare_egohands.py HOT 21
- Shuffle buffer filled. HOT 2
- How can I view the output log of the training HOT 6
- Trouble converting retrained SSD Mobilenet v2 model to TensorRT engine HOT 7
- tf_trt_models's 'camera_tf_trt.py' HOT 8
- Software to labelize your images HOT 3
- ./train.sh result window
- how to see several images HOT 6
- How to improve created model performance HOT 31
- Training with background images HOT 3
- Loaded runtime CuDNN library: 7.5.1 but source was compiled with: 7.6.0. HOT 3
- Retraining Custom MobilenetV2-fn and use on TensorRT HOT 14
- About model HOT 3
- Training on GTX 1080 Ti HOT 2
- Where is "ssdlite_mobilenet_v2_egohands"? 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 hand-detection-tutorial.