dodandeniya / panda-model Goto Github PK
View Code? Open in Web Editor NEWThis is an example of custom object detection using Tensorflow object detection api
This is an example of custom object detection using Tensorflow object detection api
Dear sir,
This repo is very useful for me. Thank you very much.
I want to convert the "fine_tuned_model/saved_model" to tensorflowjs model.
I tried it, but does not work..
On Google Colab, after "Validation".
%cd /content/drive/My Drive/panda-model/fine_tuned_model
!mkdir web_model
!pip install tensorflowjs==1.3.1
!tensorflowjs_converter \
--input_format=tf_saved_model \
--output_format=tfjs_graph_model \
--output_node_names='num_detections,detection_boxes,detection_scores,detection_classes,detection_masks' \
--skip_op_check \
--saved_model_tags=serve \
./saved_model \
./web_model
!ls -la ./web_model
-rw-r--r-- 1 root root 4194304 Nov 2 03:24 group1-shard1of5.bin
-rw-r--r-- 1 root root 4194304 Nov 2 03:24 group1-shard2of5.bin
-rw-r--r-- 1 root root 4194304 Nov 2 03:24 group1-shard3of5.bin
-rw-r--r-- 1 root root 4194304 Nov 2 03:24 group1-shard4of5.bin
-rw-r--r-- 1 root root 1753480 Nov 2 03:24 group1-shard5of5.bin
-rw-r--r-- 1 root root 303953 Nov 2 03:24 model.json
!rm -rf web_model.zip
!zip -r web_model.zip ./web_model/
And Javascript.
<script src="https://cdn.jsdelivr.net/npm/@tensorflow/[email protected]"></script>
......
var model = await tf.loadGraphModel('http://xxxxxxxxxx.com/web_model/model.json');
Error.
[email protected]:2 Uncaught (in promise) TypeError: Cannot read property 'producer' of undefined
at t. ([email protected]:2)
at [email protected]:2
at Object.next ([email protected]:2)
at o ([email protected]:2)
I don't know if the cause is the version or the conversion is bad. If you know it, please let me know.
Regards.
Thanks for the notebook. The first step throws an error. You probably did not code for TF 2.2
AttributeError Traceback (most recent call last)
in ()
1 import tensorflow as tf
----> 2 config = tf.ConfigProto()
3 config.gpu_options.allow_growth = True
4
5 with tf.device('/gpu:0'):
AttributeError: module 'tensorflow' has no attribute 'ConfigProto'
print(tf. version)
2.2.0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.