TrainYourOwnYOLO icon indicating copy to clipboard operation
TrainYourOwnYOLO copied to clipboard

[Request] Support for Tensorflow Lite

Open NiklasWilson opened this issue 4 years ago • 7 comments

It would be awesome if the project had support for an additional step. Converting the trained modal to TFLite. TFlite modals are needed for things like the google coral.

NiklasWilson avatar May 19 '20 13:05 NiklasWilson

Train_YOLO has the command line option "--is_tiny", which is said to "Use the tiny Yolo version for better performance and less accuracy. " Haven't checked whether it uses TFLite

bertelschmitt avatar May 20 '20 12:05 bertelschmitt

Thanks but I already use the tiny yolo. It works way better on a PI. ~250ms The way TFLite works is that you First train a normal TF modal and than afterwards you convert it to a TFLite modal.

One could choose to use either the normal yolo or the tiny yolo which both result in a normal TF modal.

NiklasWilson avatar May 20 '20 13:05 NiklasWilson

What is your experience with the Coral? I have one sitting around, but I didn't play much with it.

bertelschmitt avatar May 20 '20 14:05 bertelschmitt

limited. I successfully used it with a pre-trained TFLite modal on my live camera feeds. It takes 30-60ms. That is where my experience ends with it. After I have a way to train my own TFLite Modal I intend to play with it more. But I actually haven't done much in the last couple months related to this been busy with other projects. From what I remember the process of converting a normal modal to a lite modal had a bit of learning curve, no easy tool out there when I looked.

NiklasWilson avatar May 20 '20 14:05 NiklasWilson

That was pretty much my experience. My idea was to give cheap GPU-like hardware support to VMs, but I quickly got dissuaded ...

bertelschmitt avatar May 20 '20 23:05 bertelschmitt

Train_YOLO has the command line option "--is_tiny", which is said to "Use the tiny Yolo version for better performance and less accuracy. " Haven't checked whether it uses TFLite

it uses tiny yolo. tiny yolo is much faster than a full set of weights but you can expect at least 1/3 less accuracy. tflite, in my experience, is faster that tiny yolo

robisen1 avatar Sep 07 '20 05:09 robisen1

but you can expect at least 1/3 less accuracy. tflite, in my experience, is faster that tiny yolo

My understanding is Tiny yolo and tflite can both be used at the same. Tiny yolo seemed accurate enough for my use cases. I think the minimum amount of training data for "accurate" results is higher on tiny yolo. Tflite (non yolo) takes ~60ms on my pi TinyYolo takes ~500ms on my pi Yolo takes 1-2sec on my pi

NiklasWilson avatar Sep 07 '20 12:09 NiklasWilson