Ahmad-Almosallam / object_detection_flutter

Truly realtime object-detection in flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TensorFlow Lite Flutter Object Detection with YOLOv4 support

This is a fork version of the am15h/object_detection_flutter. If not for his flutter libraries and his repository. This could not be done. This has yolov4 support. To use your custom model, this requires you to use make changes to the image_conversions.dart file in the tflite_flutter_helper library. Simply copy and paste over the file with the code found here (my fork of his library):

https://github.com/TexMexMax/tflite_flutter_helper/blob/master/lib/src/image/image_conversions.dart

If you want to add your own model, remember to add the model and label file to the assets folder, and make the neccessary changes in classifierYolov4.dart (simply change the variables MODEL_FILE_NAME and LABEL_FILE_NAME).

In addition, using this article (https://medium.com/@hugand/capture-photos-from-camera-using-image-stream-with-flutter-e9af94bc2bee), I was able to make the conversion of the camera from YUV420 to RBG much faster incorporating C code.

Object Detection app built using TFLite Flutter Plugin and TFLite Flutter Helper Library

Important

  • execute install.sh(linux) or install.bat(windows) for downloading tflite binaries. More info here.

Demo

DEMO

Shot on Pixel 4

The pre-built APK can be found here.

About

Truly realtime object-detection in flutter


Languages

Language:CMake 35.0%Language:Dart 32.5%Language:C++ 27.8%Language:C 3.5%Language:Shell 0.7%Language:Swift 0.3%Language:Kotlin 0.1%Language:Objective-C 0.0%