How ibavi-git/trafficiq works
TrafficIQ’s present product is a CPU-oriented traffic-video analysis toolkit: users run command-line tools on images or videos to obtain detections, persistent tracks, counts, congestion/anomaly analysis, or feature artifacts. Its implemented AI-core also includes ViT extraction, YOLO–ViT fusion, and Grad-CAM generation. The README describes a future FastAPI/dashboard and optimization/deployment plans, but those components are absent from this tree, so they are not modeled as implemented services. Several module-to-module links rely on the README or SOURCE INDEX; unsampled internals are not assumed.
Main entry points: fuse.py YOLO–ViT fusion · classes.py Vehicle classes · analyze.py Congestion and anomalies · detect.py YOLO detection
Components 13
Vehicle Vision
- Vehicle classes
ai-core/detection/classes.py - YOLO detection
ai-core/detection/detect.py - ByteTrack tracking
ai-core/tracking/track.py
Traffic Analysis
- Line-crossing counts
ai-core/tracking/count.py - Congestion and anomalies
ai-core/traffic/analyze.py
Scene Context
- ViT embeddings
ai-core/vit/extract.py - YOLO–ViT fusion
ai-core/fusion/fuse.py - Fusion visualization
ai-core/fusion/visualize.py - Grad-CAM explanations
ai-core/xai/gradcam.py
Performance Tools
- CPU benchmark
ai-core/benchmark/benchmark.py
Other components
- Traffic operator
- Image or video
- Analysis artifacts
Connections 24
- Traffic operator → Image or video: provides
README.md - Image or video → YOLO detection: input to
README.md - Image or video → ByteTrack tracking: input to
README.md - Image or video → Line-crossing counts: input to
README.md - Image or video → Congestion and anomalies: input to
README.md - Image or video → ViT embeddings: sampled by
README.md - Image or video → YOLO–ViT fusion: input to
ai-core/fusion/fuse.py - Image or video → Grad-CAM explanations: input to
ai-core/xai/gradcam.py - Image or video → CPU benchmark: benchmarked by
README.md - YOLO detection → Vehicle classes: uses classes
ai-core/detection/detect.py - ByteTrack tracking → Vehicle classes: uses classes
ai-core/tracking/track.py - Line-crossing counts → Vehicle classes: uses classes
ai-core/tracking/count.py - Congestion and anomalies → Vehicle classes: uses classes
ai-core/traffic/analyze.py - YOLO–ViT fusion → Vehicle classes: uses classes
ai-core/fusion/fuse.py - YOLO–ViT fusion → ViT embeddings: loads embeddings
ai-core/fusion/fuse.py - YOLO–ViT fusion → Congestion and anomalies: uses congestion scoring
ai-core/fusion/fuse.py - YOLO detection → Analysis artifacts: writes annotated output
README.md - ByteTrack tracking → Analysis artifacts: writes tracked video
README.md - Line-crossing counts → Analysis artifacts: writes counts
README.md - Congestion and anomalies → Analysis artifacts: reports traffic metrics
README.md - ViT embeddings → Analysis artifacts: saves embeddings
ai-core/vit/extract.py - YOLO–ViT fusion → Analysis artifacts: saves fused features
ai-core/fusion/fuse.py - Grad-CAM explanations → Analysis artifacts: writes overlays
ai-core/xai/gradcam.py - CPU benchmark → Analysis artifacts: records baseline
README.md