GithubHelp home page GithubHelp logo

spyroscvrs / autonomous-urban-surveillance-system Goto Github PK

View Code? Open in Web Editor NEW
24.0 3.0 7.0 4.19 MB

Python 41.69% Makefile 0.41% C 53.97% Shell 0.09% C++ 3.83%
surveillance surveillance-systems python c vanishing-points deepsort deeplearning ai object-detection tracking

autonomous-urban-surveillance-system's Introduction

Scene understanding and pedestrian/vehicle tracking from traffic cameras

The increase of vehicles in urban environments has raised the importance of decreasing car accidents, managing traffic congestion and building automated transportation systems. In this repository, an automatic traffic surveillance system is proposed that uses traffic camera videos of different resolutions. The objective is implemented in three core steps, the first step is the object detection on the scene, the second objective is multiple object tracking and thirdly is the depth estimation which translates coordinates on the image to coordinates on the road plane. The automatic traffic surveillance system provides, obtained trajectories of vehicles and pedestrians, estimated instantaneous and average speeds and translation of tracked trajectories to OpenScenario format.

Getting Started

Requires Linux Ubuntu 16.04 (or more recent version) / Python 3

Setup

  1. enviroment.yml file provides conda enviroment named "app" with installed dependencies.

  2. Make sure Detectron2 is installed in the conda enviroment. ( instructions: https://github.com/facebookresearch/detectron2/blob/master/INSTALL.md )

  3. Conda enviroment provides pytorch version only for CPU, make sure that a pytorch version with CUDA is installed if application to be tested on GPU.

Instructions

1) Create and activate Conda enviroment
conda env create -f environment.yml conda activate app

2) TFL traffic cameras video acquisition
*GPU/CPU: python get_videos.py

(Suppose having a video file called "test.mp4")
3) Run Application
*CPU: python Overall.py test.mp4 --coordfile test.txt
*GPU: python Overall.py test.mp4 --coordfile test.txt --use_cuda True

4) Trajectories plot
*GPU/CPU: python get_trajectory.py --input_coords test.txt --output_name test
(Resulting plot shown in Results Folder)

5) Speed Estimates
*GPU/CPU: python get_speed.py --input_video test.mp4 --input_coords test.txt --output_speeds test_speed.txt
(test_speed.txt file in Results Folder)

6) OpenScenario file generation
*GPU/CPU: python ToSimulation.py --input_video test.mp4 --input_coords test.txt --output_name test
(test.xosc file in Results Folder)

Photos

Object Detector

Object Tracker

Depth Estimator

Simulator (not provided)

Author

Spyridon Couvaras
Email: [email protected]

Video

https://www.youtube.com/watch?v=nomez0_uHzo

Acknowledgments

autonomous-urban-surveillance-system's People

Contributors

spyroscvrs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

autonomous-urban-surveillance-system's Issues

paper

Hello, I am interested in the problem of self-calibration of surveillance cameras. Could you give the reference of the paper corresponding to this code?

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.