Skip to content

Tensorflow lite model that detects bicycle helmet wearing and Android demo application

License

Notifications You must be signed in to change notification settings

BEOKS/Bicycle-Helmet-Wearing-Detection

Repository files navigation

Bicycle-Helmet-Wearing-Detection

GitHub last commit GitHub Release Date

Overview

After creating a tensorflow lite model that continuously performs bicycle helmet detection using quantized MobileNet SSD and Bicycle Helmet Dataset, it was made to be used in real time on Android by referring to TensorFlow Lite Object Detection Android Demo.

Usuage

All models and code are ready. To run, download this repository, open it using Android Studio, and run it with an emulator or personal device.

Model Training

Dataset

After downloading the data set from kaggel, updating it on roboflow, visualizing the data, checking basic information, and dividing it into train, validation and test data at ratio of 70%, 20% and 10%. image

Training

check Roboflow-TFLite-Object-Detection.ipynb file, The file is very complex, so I recommend viewing it in colab.

Test

As a result of learning, you can see the result that distinguishes between wearing a helmet and not wearing it. You can check out the demo video through the link below.

image image
Video : https://user-images.githubusercontent.com/30094719/111058799-4a55c400-84d4-11eb-87f0-0948fcc11ff0.mp4

Reference

  1. TensorFlow Lite Object Detection Android Demo,https://github.com/tensorflow/examples/tree/master/lite/examples/object_detection/android
  2. How to Train a Custom TensorFlow Lite Object Detection Model, https://blog.roboflow.com/how-to-train-a-tensorflow-lite-object-detection-model/
  3. Bicycle Helmet Dataset, https://www.kaggle.com/andrewmvd/helmet-detection
  4. MobileNet SSD, https://github.com/tensorflow/models/tree/master/research/object_detection