Skip to content

Repository files navigation

Algorithm for detecting foreign objects on tram tracks (dRoI) based on segmentation

Weights available in HuggingFace: here.


Example:

Tracking Example Tracking Example 2 Day Example 1 Night Example

Graduation Thesis (FQW/ВКР): Algorithm for detecting foreign objects on tram tracks based on their segmentation.

Seven segmentation models were researched and trained (YOLO-seg: 8n, 8s, 11s, 26s; SegFormer: B0, B3; DeepLabV3+: ResNet50), as well as three detectors: YOLOX, YOLOv8, and YOLOv5.

Based on the research results, the following were selected for the task:

  • Segmentor: YOLOv11s-seg
  • Detector: YOLOv8s
  • Tracker: ByteTrack

The developed algorithm is available at: https://github.com/MathematicLove/tram-dynamic-roi-tracker

Useful Links

  • Research paper (article): https://elibrary.ru/qfcwed
  • Diploma for 1st degree laureate (Best report in ML and Intelligent Data Processing section): Certificate
  • Full Thesis (FQW/ВКР): coming soon

Launcher UI

ui/app.py is a minimal desktop launcher: pick Camera Mode (live camera) or Video Mode (drop/select a video file), set the tram speed, and it runs algorithm/detection.py for you. Also you can test it on Image Mode (drop/select a image file).

python ui/app.py

Drag-and-drop in Video Mode requires the optional tkinterdnd2 package (pip install tkinterdnd2); without it, use the "Обзор…" file picker button instead.


Available Models (Pickle)

Model Type Repository
YOLOv8n Segmentation tram-dynamic-roi-tracker-yolo8n
YOLOv8s Segmentation tram-dynamic-roi-tracker-yolo8s
YOLOv11s Segmentation tram-dynamic-roi-tracker-yolo11s
YOLOv26s Segmentation tram-dynamic-roi-tracker-yolo26s
SegFormer B0 Segmentation tram-dynamic-roi-tracker-segformerb0
SegFormer B3 Segmentation tram-dynamic-roi-tracker-segformerb3
DeepLabV3+ ResNet50 Segmentation tram-dynamic-roi-tracker-deeplabv3resnet50

by Salimli Ayzek (Салимли Айзек): https://mathematiclove.github.io

About

Seven trained segmentation models and three detectors are presented. An algorithm for detecting foreign objects on tram tracks based on segmentation was implemented, achieving a Dice segmentation accuracy of 91%, a detector mAP@50 of 60%, and a processing speed of 41 FPS on the M3 Pro.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages