How chandanay-24/crowd-movement-classification-in-single-camera-system_msc_calcutta-university works
This repository implements single-camera crowd-movement classification. Its main workflow reads a video, detects pedestrians, converts detections into positions, and classifies 10-second segments from spatial-dispersion slopes. Separate scripts evaluate predictions, visualize results, and train an auxiliary Random Forest from segment statistics. The graph follows calls visible in sampled source and capabilities described in the README; unsampled data wiring is omitted where it cannot be verified.
Main entry points: main.py Pipeline runner · detector.py Person detector · utils.py Position loader · heuristics.py Segment classifier
Components 14
Classification Pipeline
- Pipeline runner
main.py - Frame reader
utils.py - Person detector
detector.py - Detection CSV
- Position loader
utils.py - Segment classifier
heuristics.py - Segment results
ML Extension
- Feature data reader
random_forest.py - Random Forest
random_forest.py - Saved model
Evaluation and Reports
- Accuracy evaluator
compute_accuracy.py - Report plotter
plot.py
Other components
- Video and labels
- YOLOv8
Connections 13
- Video and labels → Pipeline runner: starts with
README.md - Pipeline runner → Frame reader: reads frames
main.py - Pipeline runner → Person detector: requests boxes
main.py - Person detector → YOLOv8: runs inference
- Pipeline runner → Detection CSV: saves boxes
main.py - Pipeline runner → Position loader: loads positions
main.py - Position loader → Detection CSV: reads boxes
- Pipeline runner → Segment classifier: classifies segments
main.py - Segment classifier → Segment results: writes labels
heuristics.py - Feature data reader → Random Forest: provides features
random_forest.py - Random Forest → Saved model: saves model
random_forest.py - Accuracy evaluator → Segment results: reads predictions
compute_accuracy.py - Report plotter → Segment results: reads labels
plot.py