ksericpro
6 min readDec 6, 2023

--

Image & Video Objection Detections

How to detect objects like mobile, face, cups, etc, in a image or camera live video stream? This example will use a pre-trained model for TFLite aka efficientdet that can be found in Kagger. In fact Kagger is the best website to download models, dataset and join competitions for these serious about data science. In fact most time, we download a pretrain model and add custom object detection to it, we do not have to start from ground zero. This technique is called transfer learning.

Git Repository

Do download the code here.

Folder Structure
  • There should be a config and models folders.
  • models are meant to store pre-train models
  • labels.csv is the classes name mapping. Later on during inferences, the detector will output the list of detected object ids. These ids will be mapped against this file
  • image_1.png is for statis image detection
  • config/local.py is the global application configuration
  • image_detection.py is the image detection program in python
  • livestream_detection.py is the livestream detection program in python

--

--