Tuesday, 19 January 2021

keras 13 tensorflowjs mobileNet & ionic react

create a python project to convert mobileNet model for tensorflowjs
#powershell
pip install tensorflow
pip install tensorflowjs

#main.py
import tensorflowjs as tfjs
import tensorflow as tf

mobileNet = tf.keras.applications.mobilenet.MobileNet()
tfjs.converters.save_keras_model(mobileNet,'mobileNet')

create ionic react project, 
copy paste model generated from python project into public/assets folder
//cmd 
ionic start app-name
npm install @tensorflow/tfjs
npm install dom-to-image

reference:


react serve static files

imagenet labels

dom to image - media source unsecure error

get temporary url for browsed local image

No comments:

Post a Comment