/Bus-Route-Detection-and-Classification

Primary LanguageJupyter NotebookCreative Commons Zero v1.0 UniversalCC0-1.0

Bus-Route-Detection-and-Classification

Contributors Forks Stargazers Issues CC0 v1.0 License LinkedIn

Bus Route Detector and Classifier for Visually Impaired People

image


Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project :
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About the Project :

Real-time object recognition and classification of objects through static data-frames is implemented in this work. This is a promising sector to implement innovative ideas related to computer vision applications. Visually impaired individuals undergo through difficult situations and complications faced while recognizing visual information as well as processing that information in a state of chaos, like a crowded area such as bus stop. Things get even harder for them when there is a need to step up and examine whether the bus or any transport they want to board into, mainly public transports, are actually routing from their boarding destination towards their target destination. The chaotic situation makes it almost impossible for any blind person to summarize that information and board onto that transport medium correctly. There are hardly any aids for the visually impaired people that will actually help them classify between buses specifically. The idea of personal help can be held under consideration but that is not always liable and viable. This paper describes a novel approach for recognizing buses and providing the corresponding routes. The bus images are captured in real-time, then the token number is extracted and the user is informed about the route information.

Getting Started

This project can be setup locally by cloning the repo and installing the requirements.

Prerequisites

This is an example of how to list things you need to use the software and how to install them.


pip

 python -m pip install --upgrade pip

opencv-python

pip install opencv-python

Dependencies

pip install -r requirements.txt

JupyterNB implementation with Anaconda

Download Conda from Here. Then create new conda environment if you donot have conda installed previously or have not set up the environment

conda create -n env pip python=3.10

Activate the V-env by typing this command,

conda activate env

install jupyter notebook

pip install jupyter notebook

then install the dependencies as mentioned in the Prerequisites section.

Flow of Implementation

The project proposes the following flow for implementation of this idea :

Flowchart of the Process

Following is the flowchart for the back-end process which has been implemented :

Flowchart of the Process

Optical Character Recognition :

After the classification of buses we implemented EasyOCR for reading the token numbers any other alternate Optical Character Recognition algorithm can be used here but it is advised to go for EasyOCR as it is easier to implement and gives almost 100% accuracy in character recognition.

The algorithm for the easy OCR is as follows :

Input: Bus image with route number pasted on it. Output: Recognised text that is number from the image

Stages of Initialization:

Start

  • Convert RGB image to Grey image
  • Apply bilateral filter for noise reduction
  • Apply canny filter for edge detection
  • Finding contours
  • Apply Masking
  • Extracting text from the masked image using easy OCR
  • Running if-else statement to find bus route

End

Results

The following implementation with TensorFlow yeilded 98.6% Accuracy on classification of Buses from non-Bus vehicles and 99.99% Accuracy in Optical Character Recognition.

Positive Classification ➡ Pre-Processing, then applying Canny Edge and Bilateral Filters ➡ Contour-Detection and Saving the cotour features. ➡ Output Number ➡ Corresponding Route ➡ Save as Text ➡ Audio Queue 

License

Distributed under the CC0 License. See LICENSE.txt for more information.

Contact

Twitter/Email - @DrCybernotix - 12shreyashh@gmail.com

Project Link: Bus-Route-Detection-and-Classification