Blog · April 23, 2025 · Pete Cooper

AI-Powered Helmet Detection App for eBike Fleet Management

Client overview

A growing eBike fleet operator in India faced a recurring issue: riders not wearing helmets led to automatic fines issued to the fleet owner, not the individual rider. With increasing fines and no way to verify accountability, the client needed a smart, real-time detection solution to protect their business.

The challenge

In India, roadside surveillance cameras enforce helmet laws. Violations result in e-tickets sent to vehicle owners. For fleet managers, this meant:

  • Mounting liability for rider behavior.
  • Financial penalties with no clear recourse.
  • A need for evidence-based, automated compliance enforcement.

Our solution

We developed a real-time helmet detection app using TensorFlow and Python, designed specifically for Android smartphones mounted on eBikes. The app detects if a rider is wearing a helmet and logs images accordingly.

Why Android?

  • 70%+ market share in India.
  • Cost-effective, globally available, IP-rated phones.

Data collection and model training

  • Volunteers provided videos with and without helmets.
  • We used FFmpeg to convert videos into labeled image datasets.
  • Dataset split: 70% for training, 30% for testing.
  • We used back regression and iterative optimization to improve accuracy.

Model deployment

  • Integrated into the app to assess helmet usage every few seconds.
  • Results were filtered using multiple validation layers:
    • Image quality checks (noise, saturation, brightness).
    • Face detection to confirm rider presence.
    • Multi-frame consistency before logging a violation.

Scaling with Mechanical Turk

Initially, all image labeling was done manually. To scale up:

  • We used Amazon Mechanical Turk to crowdsource accurate image labels.
  • We trained the model iteratively using the expanding dataset.

Field challenges and fixes

Issue: Poor image quality due to sun glare, motion blur, and low-cost cameras.

Fixes:

  • Discarding low-quality images using pre-screening filters.
  • Taking multiple shots and accepting results only on consistent predictions.
  • Embedding face recognition to ensure a valid detection zone.

Results

  • Accurate helmet detection in real-world riding conditions.
  • Fewer fines and better rider accountability.
  • A real-time feedback loop to improve future predictions.

“Overall the project was a great success, and the app worked as expected.”

Technologies used

  • TensorFlow (ML framework)
  • Python (development language)
  • Android OS (app platform)
  • FFmpeg (video to image conversion)
  • Amazon Mechanical Turk (image labeling at scale)

Have something that needs to see?

Tell us what your product needs to detect, measure or recognise. We will tell you honestly what it takes to build.