Skip to main content

Tensorflow2 Crash Course - Part IV

Mong Kok, Hongkong

This set of Notebooks provides a complete set of code to be able to train and leverage your own custom object detection model using the Tensorflow Object Detection API.

This article is based on a Tutorial by @nicknochnack.

Github Repository

Freezing and Conversion

Freezing the Graph

Freezing outputs a slice of our model to:

Tensorflow/workspace/models/my_ssd_mobnet/export

This has the same file/folder structure as the pre-trained model we downloaded earlier and is ready to be used in external applications.

Conversion for TSJS

TensorFlow.js is a library for machine learning in JavaScript. Develop ML models in JavaScript, and use ML directly in the browser or in Node.js.

Running the command will convert your exported custom model to the TFJS format and save it to:

Tensorflow/workspace/models/my_ssd_mobnet/tfjsexport

Conversion to TFLite

Deploy machine learning models on mobile and IoT devices. TensorFlow Lite is an open source deep learning framework for on-device inference.

Running the command will convert your exported custom model to the TSLite format and save it to:

Tensorflow/workspace/models/my_ssd_mobnet/tfliteexport