Comments (2)
Which model are you referring to (v1 or v2)?
In the readme I have some directions on how to use the model checkpoints (which are available for mobilenetv1) to generate your own frozen graph.
In my experience using a frozen model from different TensorFlow models can be challenging. Its better to export using your own froze graph from checkpoints
from handtracking.
Hi Victordibia,
I am using ssdlitemobilenetv2 model checkpoint. Below I mentioned the code for converting the model checkpoint to serving. But empty variable folder was generated.
import tensorflow as tf
SAVE_PATH = D:/handtracking-master/model-checkpoint/ssdlitemobilenetv2/'
MODEL_NAME = 'test'
VERSION = 5
SERVE_PATH = './serve/{}/{}'.format(MODEL_NAME, VERSION)
checkpoint = tf.train.latest_checkpoint(SAVE_PATH)
print(checkpoint)
tf.reset_default_graph()
with tf.Session() as sess:
saver = tf.train.import_meta_graph(checkpoint + '.meta')
graph = tf.get_default_graph()
sess.run(tf.global_variables_initializer())
inputs = tf.saved_model.utils.build_tensor_info(graph.get_tensor_by_name('image_tensor:0'))
detection_boxes = tf.saved_model.utils.build_tensor_info(graph.get_tensor_by_name('detection_boxes:0'))
detection_scores = tf.saved_model.utils.build_tensor_info(graph.get_tensor_by_name('detection_scores:0'))
detection_classes = tf.saved_model.utils.build_tensor_info(graph.get_tensor_by_name('detection_classes:0'))
num_detections = tf.saved_model.utils.build_tensor_info(graph.get_tensor_by_name('num_detections:0'))
export_path = './savedmodel/3'
builder = tf.saved_model.builder.SavedModelBuilder(export_path)
prediction_signature = (
tf.saved_model.signature_def_utils.build_signature_def(
inputs={'inputs': inputs},
outputs={'output1': detection_boxes,'output2':detection_scores,'output3':detection_classes},
method_name=tf.saved_model.signature_constants.PREDICT_METHOD_NAME))
builder.add_meta_graph_and_variables(
sess, [tf.saved_model.tag_constants.SERVING],
signature_def_map={
tf.saved_model.signature_constants.DEFAULT_SERVING_SIGNATURE_DEF_KEY:
prediction_signature
},
)
builder.save()
from handtracking.
Related Issues (20)
- How can I detect hands in Jpg?(panel disappeared & size) HOT 1
- Just sending a note HOT 1
- why some label is not correct?
- Problem while training: zero mAp. HOT 2
- Threading to "improve" visual performance HOT 2
- Help Needed to convert the frozen graph to Tensorflow lite model HOT 4
- Problem with egohands_dataset_clean.py HOT 4
- hand detection
- Is the coordinate position of the detection box upper left corner, lower right corner or upper left corner with width and height?
- How can I use this model in Keras?
- Confusion while generating tf records
- question about frozen_inference_graph.pb
- Oxford hand dataset
- Using the savedmodel in this project for transfer learning in Keras
- Tensorflow Lite-Mobile HOT 3
- Loaded runtime CuDNN library: 7.4.2 but source was compiled with: 7.6.0 HOT 1
- Step-By-Step Tutorial and Requirements
- What's version of tensorflow was used to train model? HOT 1
- How to modify for a url stream?
- How can i use my own model for hand gestures
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 handtracking.