YOLOv8 based parking detection system using a RTSP camera.
Offical Website
·
Report Bug
·
Request Feature
Table of Contents
Finding parking spaces is a growing problem in crowded neighborhoods, where the number of cars is rapidly increasing. This issue not only frustrates drivers but also adds to traffic congestion. What if there was a way to make finding parking easier?
Introducing ParkingSpace, a Python-based system using YOLOv8 and real-time streaming protocol (RTSP) cameras to detect parking spots. Developed during my computer science degree, with guidance from Prof. Roi Poranne, ParkingSpace aims to ease the parking challenges in urban areas.
In busy neighborhoods, finding an empty parking spot can be very difficult. This not only wastes time but also worsens traffic as drivers keep circling around. This problem led to the creation of ParkingSpace, a solution to make urban parking more efficient.
Using computer vision and YOLOv8, ParkingSpace detects empty parking spaces in real-time, even in areas without clearly defined spots. This algorithm finds available spaces, helping drivers park without unnecessary circling. With ParkingSpace, driving in crowded streets becomes easier, reducing congestion and improving the urban driving experience.
This will help you to get started with ParkingSpace if you want to run and experiment with the default street provided. For more complex changes and setting it to work on other input, please refer to the references section.
It's highly suggested to run the program on a CUDA compatible NVIDIA video card, although this version manages to use CPU, use at your own risk! You can find more information about installing CUDA here. You need 2.5 GB of space to run the demo version.
Note that ParkingSpace requires python >= 3.8
.
Before starting, creating a virtual environment is recommended. Vscode guide on how to is linked-here.
Some of the Dependencies will be installed with ultralytics.
pip install ultralytics==8.1.34
pip install opencv-python
pip install numpy
To run with ipython (highly recommended) install:
pip install jupyter
pip install ipython
Clone the repo:
git clone https://github.com/danielbob32/ParkingSpace.git
As for now, you should have every thing you need to run the demo with your machine and get to know the system by adjusting the parameters.
On the first run, after you opened a virtual environment and installed all the dependencies the model it-self will be installed, which will take some time depends on your machine. You will might need to re-run the code to actually start it.
If everything works, about 15 seconds after running the cell you should get the first frame, Congratulations! Note that this is not showing a live video and set to a specific interval, you can always reduce it to see live footage if your machine can handle it.
A window will pop-up and you will able to see the parking spots that are being processed every 15 seconds or so.
Note that the model is really heavy to assure the maximum accuracy, if you find the program crashing you can do the following steps :
- Extend the sampling intervals.
- Reduce the model resolution.
- Reduce the model accuracy.
_For more options and development, please refer to the references section.
- Add step-by-step template to init the system anywhere.
- Make a solid web-app version.
- Future development:
- Self region assignment system.
- Plug'n'Play.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache License, click here for more information.
Daniel Bobritski - danielbob32@gmail.com
Project Link: https://github.com/danielbob32/ParkingSpace
If you are interested in learning more about how to apply ParkingSpace to your use, develop and more, please check the quicklinks below.
Section | Description |
---|---|
❔ How To's | |
Home Setup | Here will be an in-depth guide on how to setup a home system. |
How to Record the data | Here will be a quick guide on how to acquire your own data. |
🖱️ Developers | |
Training the system | Here will be a guide on how to train the system on your own data. |
Effective Regions | Here will be a guide to choosing the right regions. |
Contributing | Walk-through for how you can start contributing now. |
💚 Community | |
Discord | Join our community to discuss more. I would love to hear from you and assist! |
The data that has been used is kindly listed bellow.
Section | Description |
---|---|
🖼️ Raw Data | |
Raw Images | Set of raw images snipped from the live videos. |
Augmented Images | Augmented data set of the images above to enrich the Probability map (save tracking time.) |
🖌️ Processed Data | |
Segmented Images | YOLOv8 segmented images . |
Binary Masks | Binary masks made out of the segmentation. |
Probability Map | Grey-scale probability map constructed out of the binary masks. |