YOLOv4 on Android TFLite (Without Tears)

M. Haroon Shakeel
1 min readJan 18, 2021

--

Hello everyone! In this short tutorial, I am going to show you how you can use YOLOv4 Object Detection model in Android TFLite. I am going to use YOLOv4 Tiny but the video linked at the bottom also shows how you can do it for YOLOv4 (non-tiny) and custom trained YOLOv4 TFLite model.

Step 1: Clone this GitHub Repository.

Step 2: Download and install Android Studio from here.

Step 3: Find the project folder called “android” inside the cloned repository.

Step 4: In Android Studio, open the project and let it download the dependencies.

Step 5: In Android Studio, open the “YoloV4Classifier.java” file and search for an option “isTiny”, which is set to false. Set it to true.

Step 6: At the top of Android Studio, click Build >> Build Bundle >> Build APK.

Step 7: Once Android Studio is finished making the APK file, copy it in your Android phone and install it.

Step 8: Use YOLOv4 Tiny TFLite object detector on image and your camera stream.

The following video also shows you how you can run YOLOv4 (non-tiny) version and custom YOLOv4 on your Android Phone. Hope it will help!

--

--

M. Haroon Shakeel
M. Haroon Shakeel

Written by M. Haroon Shakeel

I am PhD scholar, specializing in deep learning for natural language processing and computer vision, specifically interested in learning with minimal data.

Responses (2)