https://github.com/0xdeval/greenintervalpredicting
Current repository represents method for calculating optimal duration of green interval for certain number of pedestrians
https://github.com/0xdeval/greenintervalpredicting
Last synced: about 1 year ago
JSON representation
Current repository represents method for calculating optimal duration of green interval for certain number of pedestrians
- Host: GitHub
- URL: https://github.com/0xdeval/greenintervalpredicting
- Owner: 0xdeval
- Created: 2020-03-03T07:34:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-19T15:41:02.000Z (about 6 years ago)
- Last Synced: 2025-04-06T07:40:41.142Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 3.41 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GreenIntervalPredicting
Current repository represents method for calculating optimal duration of green interval based on object detection of crossing road pedestrians
# Structure
1. Notebooks - there are 3 notebooks, which consist all necessary code for:
a. Preprocessing images and data (DataProcessing.ipynb)
b. Formula and it description for calculating optimal green interval (GreenIntervalCalculation.ipynb)
c. Full pipeline with object detection of pedestrians and calculating optimal green interval (GreenIntervalCalculationFullPipeline.ipynb)
2. ObjectDetectionResults - some results of working object detection algorithm for detecting: Pedestrians, Non-Pedestrians and Road
3. Metrics - current folder consist all metrics and graphs, which depict how does object detection algorithm work
4. Data - current folder consist full, train annotation and label map of object detection algorithm
# Dependencies
1. Tensorflow Object Detection API (https://github.com/tensorflow/models/tree/master/research/object_detection). Full process of setting up you can find in GreenIntervalCalculationFullPipeline.ipynb notebook
2. Tensorflow < 2 version
# Run GUI Interface
There are scripts for GUI interface, which was designed for demonstrating curretn pipeline for predicting optimal green interval for pedestrians. For running current applications use the following instruction:
1. Clone current repository
2. Be sure that you have [Inference folder](https://drive.google.com/drive/folders/19McKlvEA2NohkTKk9AGlfo9MX2TWyYWT?usp=sharing), where does model weigths store
3. Run gui_interface.py in Script folder
4. Install dependencies (when you will click the button "Install dependencies", application will stop)
5. Test application!
# Train on your own data
If you want to train on your own data:
- Fill Train and Test folders on Data
- Create your own annotation files
All process of training and creating annotatio files you can find in GreenIntervalCalculationFullPipeline.ipynb notebook
# Model
Inference graph you can find [here](https://drive.google.com/drive/folders/19McKlvEA2NohkTKk9AGlfo9MX2TWyYWT?usp=sharing).
How to test current inference graph you can find in GreenIntervalCalculationFullPipeline.ipynb notebook
## Metrics
### PEDESTRIANS

Average mAp = 99.11%
### NON-PEDESTRIANS

Average mAp = 83.27%
### ROAD

Average mAp = 95.44%
# TODO
1. Web app for demo and testing
2. Dockerfile for this web app