πŸ›‘οΈ TALOS: Bicycle Safety Detection System

TALOS is a specialized computer vision model designed to enhance cyclist safety by detecting vehicles approaching from the rear. It serves as the "visual cortex" for the open-source TALOS Hardware System (Raspberry Pi 5 + Camera).

This model is a fine-tuned version of YOLOv8 Nano (v8n), optimized for real-time performance on edge devices while maintaining high recall for vehicle detection.

🚲 Project Context

This model was developed by Kevin Davidson as part of the TALOS project, a portfolio initiative to build an affordable, open-source blind-spot monitoring system for bicycles.

  • Website: kevindavidson.work/talos
  • Hardware Target: Raspberry Pi 5 (w/ AI Accelerator or CPU-only)
  • Camera Angle: Rear-facing, wide-angle (fisheye/action cam perspective)

πŸ”„ Model Versions & Iteration

This repository hosts two versions of the TALOS model, representing an iterative engineering process to address safety-critical class imbalances.

v2.0: Safety Update (Recommended!)

  • File: best_v2.pt
  • Focus: Recall improvement and decision stability.
  • Changes:
    1. Class Merging: Merged Bus and Truck into a single Heavy_Vehicle class to eliminate hazardous confusion between large vehicle types.
    2. Oversampling: Applied 4x oversampling to Motorcycle images to address a severe false-negative rate caused by dataset scarcity.
Metric v1.0 (Baseline) v2.0 (Oversampled) Improvement
Heavy Vehicle Accuracy ~60% (Confused) 74% (Stable) βœ… +14%
Motorcycle Recall 22% 31% βœ… +41% (Relative)
Motorcycle Miss Rate 50% 44% βœ… -6% (Safer)

v1.0: Baseline

  • File: best.pt
  • Details: Original 6-class model trained on the raw Valdiolus dataset.
  • Status: Legacy / Comparison only.

πŸ“Š Visual Comparison (v1 vs v2)

Confusion Matrix: Before (v1) vs. After (v2) Notice the consolidation of the "Heavy Vehicle" block and the darker blue (higher accuracy) in the Motorcycle column.

v1.0 (Baseline) v2.0 (Optimized)
Confusion Matrix v1 Confusion Matrix v2

πŸ“Š Model Details

  • Architecture: YOLOv8 Nano (yolov8n)
  • Weights: best_v2.pt
  • Training Framework: Ultralytics YOLOv8
  • Input Resolution: 640x640 (Default)
  • Classes: 6
    • 0: person
    • 1: car
    • 2: bicycle
    • 3: motorcycle
    • 4: heavy_vehicle (Truck + Bus)

πŸš€ Quick Start

You can run this model in Python using the ultralytics library.

Installation

pip install ultralytics

Usage

from ultralytics import YOLO
from huggingface_hub import hf_hub_download

# Download the model to the local cache (bulletproof method)
model_path = hf_hub_download(repo_id="obscuradesign/talos-vehicle-detection", filename="best_v2.pt")

# Load the cached model
model = YOLO(model_path)

# Run inference
results = model("path/to/video.mp4")

πŸ“ˆ Performance and Training

The model was trained on the Valdiolus Rear View Camera Dataset, specifically curated for bicycle safety scenarios.

Training Metrics (v2.0)

Metric Value
Epochs 60 (new)
Precision See Below
Recall See Below
mAP@50 See Below
mAP@50-95 See Below

Training Results

Training Graphs

⚠️ Safety Warning & Limitations

DISCLAIMER: This software is a PROTOTYPE and is NOT intended for life-critical safety applications.

  1. Prototype Status: This model is a student project and has not undergone rigorous industrial safety testing.

  2. Environmental Factors: Performance may degrade in low-light conditions (night), heavy rain, or lens obstruction.

  3. False Negatives: While optimized for recall, the model may occasionally miss vehicles, especially if occluded or at extreme distances.

  4. Liability: The creator assumes no liability for accidents or injuries occurring while using this system. Use at your own risk.

πŸ“„ License

This model is released under the MIT License. You are free to use, modify, and distribute it, provided credit is given to the original creator.

Downloads last month
60
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for obscuradesign/talos-vehicle-detection

Base model

Ultralytics/YOLOv8
Finetuned
(127)
this model