Git Product home page Git Product logo

traffic-management's Introduction

Traffic Management - The Unconventional Way

This repository is a project under Meghalaya Police Hackathon 2020.

Overview

Recently, Meghalaya Home Minister James P.K. Sangma told the Assembly that around 1.7 lakh vehicles pass through Shillong during peak hours and around 93,000 on a normal day. According to a study by the Boston Consulting Group, India’s biggest cities are losing approximately US$22 billion (Rs. 1,62,200 crore) annually due to traffic congestion. Due to narrow roads and a large number of vehicles per capita, frequent traffic congestion occurs in Shillong. It leads to wastage of time for commuters, employees, students. Blocked traffic may interfere with the passage of emergency vehicles (eg. Ambulance, Army/Police Vehicle, etc.). Higher chance of collisions due to tight spacing and constant stopping-and-going.

Objectives

  • Detecting vehicles and their License Plates using road-side cameras.
  • Analyzing parking areas and suggesting parking slots to new vehicles using mobile app.

Prerequisites

Environment

  • Python >= 3.6.0
  • Pytorch >= 1.3.0

Get code

git clone https://github.com/mrityunjay-tripathi/traffic-management.git
cd traffic_management
pip3 install --user -r requirements.txt 

Download required dataset

cd data/
bash get_traffic_data.sh

Training

Download pre-trained weights.
cd weights/
bash lpr_weights.sh
bash ps_weights.sh
Modify training parameters
  1. Review config file config/params.cfg
  2. Adjust your GPU device. see parallels.
  3. Adjust other parameters.
Start training
python train.py
Optional: Visualize training
tensorboard --logdir=PATH_WHERE_TENSORBOARD_LOGS_ARE_SAVED

Test

Put your test data in data/samples/test/ then run the following command.

python test.py

Start to use

python detect.py

Acknowledgement

Author

traffic-management's People

Contributors

mrityunjay-tripathi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

traffic-management's Issues

OSError: [Errno 12] Cannot allocate memory

I am getting Memory Error, as I can guess there is somewhere memory leak but I can't locate it.
This is the error I am getting.

Traceback (most recent call last):
File "detection.py", line 124, in
net = d.train(train_loader)
File "detection.py", line 55, in train
for data in trainloader:
File "/home/mrityunjay/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 278, in iter
return _MultiProcessingDataLoaderIter(self)
File "/home/mrityunjay/anaconda3/lib/python3.7/site-packages/torch/utils/data/dataloader.py", line 682, in init
w.start()
File "/home/mrityunjay/anaconda3/lib/python3.7/multiprocessing/process.py", line 112, in start
self._popen = self._Popen(self)
File "/home/mrityunjay/anaconda3/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/mrityunjay/anaconda3/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/mrityunjay/anaconda3/lib/python3.7/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/mrityunjay/anaconda3/lib/python3.7/multiprocessing/popen_fork.py", line 70, in _launch
self.pid = os.fork()
OSError: [Errno 12] Cannot allocate memory

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.