Code Monkey home page Code Monkey logo

auto-traffic-monitoring's Introduction

Visual scene understanding and tracking from traffic cameras

Installation

  • Install dependencies using conda from environment.yml
  • Create autonomous-traffic-monitoring/external/ folder
  • Install Detectron2 in autonomous-traffic-monitoring/external/
  • Download and add Mask R-CNN model weights (R101-FPN) from Detectron2 Model Zoo in autonomous-traffic-monitoring/detection/detetctron2-model-weights
  • Clone DeepSORT repository and put it in autonomous-traffic-monitoring/external/
  • Clone IOU/VIOU Tracker repository and put it in autonomous-traffic-monitoring/external/
  • Download and add DeepSORT model weights in autonomous-traffic-monitoring/tracking/deep-sort-model-weights/
  • [OPTIONAL (alternative camera calibration)] Install monodepth2 in and put model weights (mono+stereo_640x192) in autonomous-traffic-monitoring/camera/models/

Run

Fetch Videos

  • auto-traffic-monitoring/input/scripts/get_tfl_videos.py
  • auto-traffic-monitoring/input/scripts/get_frames_from_video.py video.mp4

Camera Calibration

Get landmarks from location of camera in Google Maps and match points with frame. Format .csv file as u, v, X, Y, Y

  • Main method (recommended): auto-traffic-monitoring/camera/run_camera.py --video_path input/videos/video.mp4 --landmarks_path input/landmarks/video_landmarks.csv --mode manual
  • Alternative method: auto-traffic-monitoring/camera/run_camera.py --video_path input/videos/video.mp4 --landmarks_path input/landmarks/video_landmarks.csv --mode manual

Object Detection

auto-traffic-monitoring/detection/run_detection.py --video_path input/videos/video.mp4 --camera_params results/video.mp4_camera_parameters.pickle

Object Tracking

auto-traffic-monitoring/tracking/run_tracking.py --video_path input/videos/video.mp4 --detection results/video.mp4_detection.csv --camera_params results/video.mp4_camera_parameters.pickle

Speed Estimation

auto-traffic-monitoring/tracking/run_speed_estimation.py --video_path input/videos/video.mp4 --tracking results/video.mp4_tracking_iou.csv --camera_params results/video.mp4_camera_parameters.pickle

auto-traffic-monitoring's People

Contributors

victorbadoual avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

xingchenzhang

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.