supervision/examples/traffic_analysis
SkalskiP 77190f287c 📍 Pin `supervision==0.15.0rc1` in `examples/traffic_analysis` 2023-09-04 23:08:12 +02:00
..
.gitignore fix(pre_commit): 🎨 auto format pre-commit hooks 2023-09-04 20:18:46 +00:00
README.md Update README.md 2023-09-04 22:36:26 +02:00
requirements.txt 📍 Pin `supervision==0.15.0rc1` in `examples/traffic_analysis` 2023-09-04 23:08:12 +02:00
script.py fix(pre_commit): 🎨 auto format pre-commit hooks 2023-09-04 20:18:46 +00:00
script.sh Add TraceAnnotator, refactor traffic analysis code and improve documentation 2023-09-04 22:16:37 +02:00

README.md

👋 hello

This script performs traffic flow analysis using YOLOv8, an object-detection method and ByteTrack, a simple yet effective online multi-object tracking method. It uses the supervision package for multiple tasks such as tracking, annotations, etc.

https://github.com/roboflow/supervision/assets/26109316/c9436828-9fbf-4c25-ae8c-60e9c81b3900

💻 install

  • clone repository and navigate to example directory

    git clone https://github.com/roboflow/supervision.git
    cd supervision/examples/traffic_analysis
    
  • setup python environment and activate it [optional]

    python3 -m venv venv
    source venv/bin/activate
    
  • install required dependencies

    pip install -r requirements.txt
    
  • download traffic_analysis.pt and traffic_analysis.mov files

    ./setup.sh
    

⚙️ run

python script.py \
--source_weights_path data/traffic_analysis.pt \
--source_video_path data/traffic_analysis.mov \
--confidence_threshold 0.3 \
--iou_threshold 0.5 \
--target_video_path data/traffic_analysis_result.mov