noodles8436 / THE-CROSS

A Smart Traffic Control System for the protection of the socially disadvantaged and rapid transport of emergency vehicles.
GNU General Public License v3.0
0 stars 3 forks source link
gdown object-detection opencv-python pyqt5 socket-server-and-client sounddevice tensorflow-hub

Contributor Covenant Build Status Python 3.8 codecov

THE-CROSS - Smart Traffic Control Application

Installation

Please check the following steps before installation.

  1. Install Anaconda on your device or computer. ( WINDOWS OS is recommended.)
  2. Make sure that AT LEAST ONE camera is connected . In addition, UP TO TWO CAMERAS can be connected to the device. ( WebCam and USB CAM are both available, but recommends using USB CAM. )

Open command prompt and create conda environment

conda create -n <env-name> python=3.8
conda activate <env-name>

:: CONDA EXAMPLE ::
conda create -n cross python=3.8
conda activate cross

1 2 3

Then, Download the Project from github, open Conda prompt in Project Folder and
Follow the commands below TO DOWNLOAD REQUIREMENTS

git clone https://github.com/noodles8436/THE-CROSS.git
cd THE-CROSS

pip install -r requirements.txt

4 5

Finally, follow the commands below to download Transfer trained Object Detection Model
( This model is obtained by transfer training the EfficientDet-D2 model. )

python download_model.py

6

Usage

  1. Open Image Detection Server

    Enter the following command to open Image Detection Server
    :: CAUTION :: wait until "Socket Opened" Message printed

    python Server.py --ip=XXX.XXX.XXX.XXX --port=XXXX
    
    :: EXAMPLE ::
    python Server.py --ip=127.0.0.1 --port=7777

    7

  2. Open the client

    Open new Conda Prompt in Project Folder ( activated <env-name> )

    conda activate <env-name>
    cd THE-CROSS

    Follow below command TO OPEN CLIENT PROGRAM
    :: CAUTION :: Client IP & PORT MUST BE THE SAME AS Server IP & PORT

    python Client.py --ip=XXX.XXX.XXX.XXX --port=XXXX
    
    :: EXAMPLE ::
    python Client.py --ip=127.0.0.1 --port=7777

    8 9

  1. Setting Crosswalk & Car Lane Area

    1. At the bottom right of the program screen, find the area you want and click on the area setting button.
    2. When clicking on the button, wait for the real-time camera image to be displayed in the windo that pops up.
    3. When the real-time camera image is displayed in the pop-up window, click on the four spots on the screen to set a square-shaped area.
    4. If you click more than four spots, the four spots you clicked before will be removed, and you can reset the square-shaped area by clicking on the spots again.
    5. To save, press the keyboard "Q" key.
  2. Setting the value of time increase or decrease.

    1. Change the several values that exist in the lower left to the desired values.
    2. Press the "Change Settings" button.

Development & Test environment

OS  : Windows 10 Education 64 Bit (10.0, Build 19042)
CPU : Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz (4 CPUs), ~3.2GHz
RAM : DDR3 16GB
GPU : NVIDIA GeForce GTX 1050 Ti 4GB

FAQ

Library License

tensorflow = Apache 2.0   
tensorflow-hub = Apache 2.0   
OpenCV = Apache 2.0   
PyQT5 = GPL v3   
Sphinx = BSD
Numpy = BSD 3-Clause   
sounddevice = MIT   
gdown = MIT   
sphinx_rtd_theme = MIT   

How to Conribute

Check out the 'HOW TO CONTRIBUTE' item on the Github Wiki Page.

Contributors

Thanks everyone who helped me with this project.