Skip to content

TexMexMax/object_detection_flutter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 35.1%
  • Dart 32.5%
  • C++ 27.8%
  • C 3.5%
  • Shell 0.7%
  • Swift 0.3%
  • Other 0.1%