Computer Vision

Indonesian Car Retrieval System

End-to-end vision pipeline

View the deck
Indonesian Car Retrieval System — End-to-end vision pipeline

The story

This pipeline watches traffic video and labels every car it sees by body type. It works in two stages: a detector finds the cars, then a classifier decides whether each one is an MPV, a sedan, a pickup and so on.

I built every stage. A scraper collected Indonesian car photos from OLX, Carmudi and Mobil123, then validated, cropped and split them into an eight-class dataset that I published on Kaggle. For detection I fine-tuned YOLOv12n on vehicle images from COCO. For classification I trained a PyTorch model with an EfficientNet-B4 backbone and CBAM blocks, which add channel and spatial attention, using augmentation and a weighted loss to handle class imbalance. The last notebook runs both models frame by frame on a test video and writes an annotated copy.

A car-detection case like this one opens my talk The Right AI for The Right Problem: a small detector plus a CNN cost about $0.001 per image and answered in about 50 ms, against $0.01–0.03 and 3–5 seconds for GPT-4V.

Highlights

  • Two stages: YOLOv12n detection, then EfficientNet-B4 + CBAM classification
  • My own eight-class dataset of Indonesian cars, scraped from three marketplaces and published on Kaggle
  • Class imbalance handled with augmentation and a weighted loss
  • Runs end to end on video and outputs an annotated clip

Stack

  • YOLOv12n
  • EfficientNet-B4
  • CBAM
  • PyTorch

Resources

Filed under

More projects