Sign in

Alex G.
ML DevOps engineer. 🙂 I am always open to new opportunities and offers. 🖖 I trying to help the world 🌏 with machine learning.
Quantization your model .h5 or tflite using TensorFlow Lite (Photo,GIF by Author)

Short summary:

In this article, I will explain what is quantization, what types of quantization exist at this time, and I will show how to quantization your (custom mobilenet_v2) models .h5 or .pb using TensorFlow Lite only for CPU Raspberry Pi 4.

Code for this article is available .

Note before you…


Temperature test of the raspberry pi 4 using TensorFlow & TensorFlow Lite (Photo,GIF by Author)

Short summary:

In this article, I will explain how to create a temperature test of the raspberry pi 4 using TensorFlow & TensorFlow Lite.
I will run image-classification of the raspberry pi 4 using TensorFlow & TensorFlow Lite in real-time from pi-camera. …


Short summary:

In this article, I will explain how to create image classification (persons, animals, other) on raspberry pi using custom model tflite (output to terminal) dividing image into 4 parts using OpenCV and TensorFlow Lite. Code for this article is available .

Note before you start:

So, Let’s start :)

Hardware preparation:

Software preparation:

1 Create a neural network model to predict 3 classes persons, animals, others.

I have…


How to divide the image into 4 parts using OpenCV (Photo,GIF by Author)

Short summary:

In this article, I will explain how to divide the image into 4 parts using OpenCV. Code for this article is available .

So Let’s start :)

For example, I want to divide my photo into 4 parts:


Simple image classification (persons, animals, other) on raspberry pi using custom model tflite (output to terminal) (Photo,GIF by Author)

Short summary:

In this article, I will explain how to create a solution for simple image classification (persons, animals, others) on raspberry pi using a custom model tflite (output to terminal).
I will use a custom model tflite which I converted from h5.
And all results will be shown in the terminal. Code for…


Image classification (persons, animals, other) on raspberry pi from pi-camera (with cycle while) using custom tflite model (output to terminal) (Photo,GIF by Author)

Short summary:

In this article, I will explain how to create a solution for image classification (persons, animals, other) on raspberry pi from pi-camera (with cycle while) using custom tflite model (output to terminal).
I will use a custom model tflite which I converted from h5.
And all results will be shown in the…


image classification (Photo,GIF by Author)

Short summary:

In this article, we will recognize 3 types of X-rays: Normal, Pneumonia, Tuberculosis.

With a score:
loss: 0.1144 / accuracy: 0.9600
val_loss: 0.2944 / val_accuracy: 0.9000

You can make a few steps and run this code. Code for this article available

So Let’s start :)

In order to get started, we need data…


Create simple recognition object detection in the live time on the Raspberry Pi — version 2 (Photo,GIF by Author)

Short summary:

In this article, I will explain how to create a solution for object detection on Raspberry Pi 4 (4 GB) from Pi-camera in live time.
I will use pre-trained model.
Code for this article is available

Note before you start:

So, Let’s start :)

Hardware preparation:

Software preparation:

For run this application just run…


How to convert h5 model to tflite model (Photo,GIF by Author)

Short summary:

In this article, I will explain how to convert h5 model to tflite model. In this article, I will use . Code for this article is available .

So, Let’s start :)

We need to convert the model from h5 format to tflite format.

At first, we need to create a neural network model with h5 format.

I have already done it in the article below. So in this article, you do NOT NEED to DO IT.

Convert h5 model to tflite model

For that, we can use my . And you can see a small gif guide below :)


confusion matrix (Photo,GIF by Author)

Short summary:

In this article, I will explain how to create image classification for recognizing persons, animals, others. In this article, I will use . Code for this article is available

So, Let’s start :)

At first, we need a dataset with the next classes:
- Person
- Animals
- Other

Let me describe…

Alex G.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store