Skip to content

DmytroSDV/web_world3

Repository files navigation

Web_World: Park-Auto

The final project of the course Python 19 Data Science, on the Web framework - Django.

With this application, you will be able to automatically identify car registration numbers in images, track the length of parking for each unique car, and calculate accumulated parking costs. Parking is not just a place for your car, it is an important part of the city infrastructure that affects the comfort and safety of all road users. Every time you choose a parking place, think about how your decision will affect others. Leave enough space for pedestrians, cyclists and other drivers. Proper parking is respect for others and a contribution to creating a safer and more convenient city.

Table of contents:

General info:

Web_World: Park-Auto - it performs the following algorithm model:

  • paddleocr - aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and apply them into practice.
  • opencv - open Source Computer Vision Library

Features:

Web_World: Park-Auto - performs the following features:

  • 👨‍💻 Authorization and Authentication: - users can register, log in, and log out.
  • 🚗 Image Uploading: - users can upload images for car number recognition via personal profile.
  • 🤓 User profile management: - car auto history, recognized numbers, payment history.
  • 😎 Admin profile management - adjusted django admin profile, giving full project management possibility.
  • 📆 Celery task scheduler - task scheduler that performs auto email notifications, for blacklisted users.
  • 🌌 Model algorithm: paddleocr - recognition algorithm already trained and implemented.
  • 🐳 Docker container: - the project can start-up via containerized Docker.

Image recognizing:

Setup-Locally:

  1. The first thing to do is to clone the repository:
git clone -b main https://github.com/IVadymMarchenko/web_world.git
  1. Activate virtual environment and install dependencies from the root folder where pyproject.toml exists:
poetry shell
poetry install --no-root
  1. Once poetry has finished downloading the dependencies:

    • Create .env file in project root and fill in the file like this example:
DJANGO_SECRET_KEY=*your secret key*

POSTGRES_DB_NAME=*your postgre db name*
POSTGRES_USER=postgres
POSTGRES_PASSWORD=w*your postgre db password*
POSTGRES_PORT=5432
POSTGRES_DOMAIN=*your postgre domain*

EMAIL_HOST=*your main smtp*
EMAIL_PORT=*your main smtp port*
EMAIL_HOST_USER=*your email address*
EMAIL_HOST_PASSWORD=*your email password*

CLOUD_NAME=*your cloudidnary name*
API_KEY=*your cloudinary api key*
API_SECRET=*your api secret phrase*

REDIS_HOST0=*your redis host for celery*/0
REDIS_HOST1=*your redis host for celery*/1
  1. Then run docker container and make migrations for db:
    • Run postgre docker container.
    • Run redis docker container.
      • From any terminal window:

For postgre:

docker run --name postg_data_science -d -h localhost -p 5432:5432 -u postgres -e POSTGRES_PASSWORD=*your password from env file POSTGRES_PASSWORD* postgres

For redis:

docker run --name my-redis -d -p 6379:6379 redis

From root projectfolder /app_parking/ make migrations:

(env)$> cd app_parking
(env)$app_parking> python manage.py makemigrations
(env)$app_parking> python manage.py migrate
  1. Before server start-up run celery worker and beat commands in separate terminals:
    • Run celery worker commdand.
    • Run celery beat command.
    • Run web server.
      • From project folder /app_parking/:
(env)$> cd app_parking

First terminal window - for celery worker commdand:

(env)$app_parking> celery -A app_parking worker -l info -P eventlet

Second terminal window - for celery beat commdand:

(env)$app_parking> celery -A app_parking beat -l info

Third terminal window - for web server start-up:

(env)$app_parking> py manage.py runserver  

Docker-setup:

From the root folder:

  1. Build containers via docker-compose:

    docker-compose build
  2. Start containers:

    docker-compose up
  3. Open http://localhost:8000 in a browser.

Technologies:

Project is mainly based on:

  • 🐍 Python - backend programming language.
  • 🌠 HTML/CSS/JavaScript: - frontend programming languages.
  • 🤠 Django - python web framework.
  • 🌌 Paddleocr / OpenCV - vision image recognition models.
  • 🐘 PostgreSQL - object-relational database management system.
  • ⚙️ Redis - data base that is responsible for the storage and cache of the main database.
  • 📆 Celery - automation task scheduler.
  • 🐳 Docker - a software platform for rapid application development, testing and deployment.
  • 👀 GitHub - storing, tracking, and collaborating on project development/deployment.
  • 🎰 Googleapis - a service by Google that provides a diverse collection of web fonts.
  • 🌎 Koyeb - service for project deplotment.
  • 👨‍👦‍👦 Trello - a visual tool that allows your team to manage projects, workflows and any type of job.

About

It is project that uses paddleocr recognition method for auto license number identification.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors