This project is a parking management system that automatically identifies vehicle license plate numbers from images, tracks parking duration for each unique vehicle, and calculates accumulated parking costs. The system includes user account management features, the ability to add and remove vehicles, and generates parking reports.
For efficient detection and recognition of vehicle license plates, our project uses advanced computer vision technologies:
- License Plate Detection: The YOLOv8s (You Only Look Once version 8 small) model is used to detect the location of license plates in images. This model provides fast and accurate identification of the area where the license plate is located in a vehicle photograph.
- License Plate Text Recognition: After detecting the license plate, PaddleOCR is used to recognize the actual text of the plate number. This powerful Optical Character Recognition (OCR) library allows for accurate reading of text from the highlighted license plate area.
The combination of these two technologies ensures high accuracy and efficiency in the process of automatic vehicle number identification, which is a key component of our parking management system.
- User Management: The administrator can add or remove users, block vehicles.
- License Plate Recognition: The system uses computer vision for automatic recognition of vehicle numbers.
- Parking Time Tracking: Automatic calculation of parking time for each vehicle.
- Parking Cost Calculation: The system calculates parking costs based on the vehicle type.
- Report Generation: Ability to export reports in CSV format for the administrator.
- Python 3.11 or higher
- Django 3.5 or higher
- PostgreSQL
- PaddlePaddle (for license plate recognition)
- Other dependencies listed in
pyproject.tomlorrequirements.txt
for correct installation, and for the correct operation of image recognition,
you must install the following libraries:
Torch==2.2.2
torchvision==0.15.1
torchaudio==2.0.1
Having previously removed the ones already installed by default.
This project can be easily set up using Docker. Follow these steps to run the application:
-
Ensure that Docker and Docker Compose are installed on your system.
-
Clone the repository
git clone https://github.com/Alona7777/Parking_Service.gitcdyour-repo-name -
Build and run Docker containers
docker-compose up --build -d
-
- Clone the repository
git clone https://github.com/Alona7777/Parking_Service.gitcdyour-repo-name -
- Create and activate virtual environment
Using Conda:
conda create -n parking-system python=3.11conda activate parking-systempip install -r requirements.txt
-
- Install Poetry (if not already installed)
- On Linux and macOS:
curl -sSL https://install.python-poetry.org | python3 -- On Windows:
Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python -- Add Poetry to your PATH:
export PATH="$HOME/.local/bin:$PATH" -
- Clone the repository
git clone https://github.com/Alona7777/Parking_Service.gitcdyour-repo-name -
- Install dependencies via Poetry
poetry install -
- Activate virtual environment
poetry shell
-
python3 -m venv venv
-
source venv/bin/activate
-
pip install -r requirements.txt
-
- Make sure you have all necessary packages installed for compiling Python dependencies:
sudo apt-get updatesudo apt-get install build-essential libssl-dev libffi-dev python3-dev
-
Use
example.envto create your own.env -
Use psql to create a PostgreSQL database and user.
-
After installing dependencies, perform database migrations:
python manage.py makemigrationspython manage.py migrate
-
Create a superuser
python manage.py createsuperuser
-
Navigate to the
parking_systemdirectory:cdand your path to theparking_systemdirectory -
Run the server:
python manage.py runserver
-
Go to http://127.0.0.1:8000/admin/ and log in with the superuser account created during setup.
-
User and Vehicle Management
-
Add new users and vehicles through the admin panel.
-
Uploading Images for License Plate Recognition
-
Users can upload images of their vehicles, and the system will automatically recognize the license plate and calculate parking time.
-
Report Generation
-
The administrator can generate a parking report and download it in CSV format through the appropriate interface.
-
Go to the vehicle addition page.
-
Fill out the form, selecting the vehicle type from the list (Car, Truck, Motorcycle, Yacht).
-
Save the vehicle.
-
Viewing Parking Sessions
-
Authorized users can view their parking sessions.
-
The administrator can view all parking sessions.
-
Exporting Reports to CSV
-
The administrator can generate a parking report for a specific period and export it in CSV format.
- Database problems: Ensure that the database connection settings are correct and the database is running


