Train a Custom Object Detection Model using Tensorflow Lite Model Maker | Transfer Learning

preview_player
Показать описание
Train and deploy a custom object detection model on Raspberry Pi. The video demonstrates preparation of your data including labelling of objects in the image, training the model and running the model on Raspberry Pi.

Read the article:-

Using a Colab notebook (similar to Jupyter notebook), you can easily train a custom model for your use case. The original notebook by Khanh LeViet of Tensorflow team is available at this link:-

You can save a copy of the notebook in Google drive and personalize it for your use. The notebook I derived from the original notebook is here:-

The code to run the custom model on Raspberry Pi :-

#TensorflowLite #modelmaker #customObjectDetection
Рекомендации по теме
Комментарии
Автор

I was literally waiting for this video! Thank you so much!

iornaya
Автор

Installing the
!pip install -q tflite-model-maker-nightly
!pip install -q tflite-support-nightly

takse SO much space it actually make the Disk's space run out
how can i solve this?

zivanaf
Автор

Great tutorial! Keep it up. You have assisted me. Much thanks

japhethmumo
Автор

can you please make video on creating custom object detection model for tensorflow js

poojap
Автор

After running this code in the Colab: model = object_detector.create(train_data, model_spec=spec, batch_size=4, train_whole_model=True, epochs=20, validation_data=val_data)

I got a error message: ValueError: The size of the train_data (0) couldn't be smaller than batch_size (1). To solve this problem, set the batch_size smaller or increase the size of the train_data.

ptsd
Автор

Installing the
!pip install -q tflite-model-maker-nightly
!pip install -q tflite-support-nightly

takes so long time, and disk space, how do i fix this?

simpasalsunda
Автор

I was waiting for this...thanq so much ...can u please include this model in human following as well so tht we can detect one of the object and follow.

ajitgadkari
Автор

when I started installing tflite packages at start it took all the space on disk in meta data
what should I do

coding_corner
Автор

There a major error when i run the pip installs : sub process errors. Any way to overcome this issue?

!pip install -q tflite-model-maker

& !pip install -q tflite-model-maker-nightly

But both statement finally show a error while installing the dependencies. And here it is:

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

engammar
Автор

Sir ye google cural usb tu official Website se nahi melta
kha say mel jaye ga
And great Video
late but always great contant 👍👍👍👍

Drill-ing
Автор

Hello! After running this code in the Colab: model = object_detector.create(train_data, model_spec=spec, batch_size=4, train_whole_model=True, epochs=20, validation_data=val_data)

I got a error message: ValueError: The size of the train_data (0) couldn't be smaller than batch_size (1). To solve this problem, set the batch_size smaller or increase the size of the train_data.

i have 64 trained Pictures with XML files and around 10 Validate Pictures with XML files, i did bounding boxes via LabelImg. I was trying to lower Batch size in the code and also i was trying to train more pictures, with no luck. Do you know any solution?

mukat
Автор

Hello sir please help there is an error with the code that

ValueError: The size of the train_data (0) couldn't be smaller than batch_size (4). To solve this problem, set the batch_size smaller or increase the size of the train_data.

what is the issue

ptsd
Автор

Thanks a lot for your great tutorial . But, can you please explain how to convert yolov8 to tflite model and use it with raspberry pi + coral usb accelerator?

ameer-alahmadi
Автор

Thanks so much for sharing. You mentioned in the video that the new result model from transfer learning can not recognize the pre-trained labelled objects. What if I would like to retain the capability to recogize existing objects while training extra objects with transfer learning? Can we do that?

andyhgnguyen
Автор

Hi, thank you for this video.
One question. How can I create a label.txt file, which contains the labels and their ID?

費司博
Автор

Hi, I ran the exact same code and it works if I don’t use the coral accelerator, however when I run it with the coral I get tge following error: ValueError: Output tensor at index 0 is expected to have 3 dimensions, found 2.

How can i solve this issue, please help

kk-zvvt
Автор

can the output model be used in a mobile application?

amirfaizm
Автор

Hi I am running out of space in google collab while installing tflite-model-maker-nightly. Is there anything which I can d other than upgrading to collab pro.

genscrewdriver
Автор

Thanks for the video, it helped me a lot. I've already subscribed to the channel. Thanks.
I have 1 question: I annotated all my images in roboflow, and I can export my database through a code that the roboflow website itself provides. In this case, step 3 would be different. How would I go about adapting? Thanks.

jonatapaulino
Автор

Hi, I have already trained my model in yolov5s (on ultralytics) and exported it as a .tflite model. I tried to follow your code on deployment on raspberry pi but I keep receiving this error in the line:
IndexError: list index out of range

could you please help if you know what to do

asmajassim