Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.05 KB

README.md

File metadata and controls

28 lines (20 loc) · 1.05 KB

Tfjs image classification

Upload and classify images in browser using TensorFlow.js

Tools used: Keras, TensorFlow.js, Javascript, HTML

Steps to run : Open a new terminal, Go to the required directory and enter the following command

python3 -m http.server 8001

Note : Here 8001 is the port number.You can choose any available port number of your choice.
Now, open a browser and open the link provided in the terminal window!

Overview of project:

  1. Create a keras model for a task ( image classification in this case )
  2. Convert keras model to tfjs.layers format using the following code which gives a model.json file as output :
tensorflowjs_converter --input_format keras \
                       path_to_keras_model.h5 \
                       path/to/tfjs_target_dir
  
  1. Create a simple HTML application and load model, images in it and make predictions using tensorflow.js.

Sample output video :

alt text