Study on Parking Space Recognition Based on Improved Image Equalization and YOLOv5
Abstract
:1. Introduction
2. Camera Calibration and Projection Transformation
2.1. Camera Calibration
2.2. Projection Transformation
3. Image Stitching and Equalization Processing
3.1. Image Stitching
3.2. Increase the Equalization Adjustment Factor
4. YOLOv5-Based Parking Space Recognition Model
4.1. Experimental Environment Configuration
4.2. Model Training
4.3. Analysis of Model Training Results
5. OpenCV-Based Car Parking Contour Line Extraction
5.1. Image Grayscale Processing
5.2. Image Filtering
5.3. Image Binarization Processing
5.4. Morphological Processing
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Shin, J.H.; Jun, H.B. A study on smart parking guidance algorithm. Transp. Res. Part C Emerg. Technol. 2014, 44, 299–317. [Google Scholar] [CrossRef]
- Zhang, L.; Huang, J.; Li, X.; Xiong, L. Vision-based parking-slot detection: A DCNN-based approach and a large-scale benchmark dataset. IEEE Trans. Image Process. 2018, 27, 5350–5364. [Google Scholar] [CrossRef] [PubMed]
- Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 7263–7271. [Google Scholar]
- Jang, C.; Sunwoo, M. Semantic segmentation-based parking space detection with standalone around view monitoring system. Mach. Vis. Appl. 2019, 30, 309–319. [Google Scholar] [CrossRef]
- Liu, Z. Design of Parking Spaces Visual Detection and Positioning System of Automatic Parking Based on Deep Learning and OpenCV. Master’s Thesis, Jiang’su University, Zhenjiang, China, 2020. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. IEEE Trans. Pattern Anal. Mach. Intell. 2017, 39, 1137–1149. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. Ssd: Single shot multibox detector. In Proceedings of the Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; pp. 21–37. [Google Scholar]
- Zhang, Z. A Flexible New Technique for Camera Calibration. IEEE Trans. Pattern Anal. Mach. Intell. 2000, 22, 1330–1334. [Google Scholar] [CrossRef] [Green Version]
- Yan, Q.C. Research on Uav Marine Remote Sensing Image Processing and Stitching Algorithm. Master’s Thesis, Yan’shan University, Qinhuangdao, China, 2022. [Google Scholar]
- Zhang, J.D.; Liu, T.; Yin, X.L.; Wang, X.; Zhang, K.; Xu, J.; Wang, D. An improved parking space recognition algorithm based on panoramic vision. Multimed. Tools Appl. 2021, 80, 18181–18209. [Google Scholar] [CrossRef]
- Dong, X.D.; Yan, S.; Duan, C.Q. A lightweight vehicles detection network model based on YOLOv5. Eng. Appl. Artif. Intell. 2022, 113, 104914. [Google Scholar] [CrossRef]
- Wei, C.Y.; Tan, Z.; Qing, Q.X.; Zeng, R.; Wen, G. Fast Helmet and License Plate Detection Based on Lightweight YOLOv5. Sensors 2023, 23, 4335. [Google Scholar] [CrossRef] [PubMed]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. arXiv 2022, arXiv:2207.02696. [Google Scholar]
- Yuan, H.C.; Tao, L. Detection and identification of fish in electronic monitoring data of commercial fishing vessels based on improved Yolov8. J. Dalian Ocean Univ. 2023, 38, 533–542. [Google Scholar]
- Meng, X.X. Research on Automatic Parking Method Based on Panoramic Vision. Master’s Thesis, Ji’lin University, Changchun, China, 2021. [Google Scholar]
Front | Back | Left | Right | |
---|---|---|---|---|
fx | 1.645 × 102 | 1.592 × 102 | 1.641 × 102 | 1.648 × 102 |
uo | 2.996 × 102 | 3.004 × 102 | 3.053 × 102 | 3.085 × 102 |
fy | 1.647 × 102 | 1.592 × 102 | 1.642 × 102 | 1.650 × 102 |
vo | 2.289 × 102 | 2.436 × 102 | 2.362 × 102 | 2.364 × 102 |
Front | Back | Left | Right | |
---|---|---|---|---|
k1 | −2.450 × 10−2 | 1.750 × 10−2 | −1.608 × 10−2 | −2.504 × 10−2 |
k2 | −8.646 × 10−3 | −8.381 × 10−2 | −2.815 × 10−2 | 1.582 × 10−2 |
p1 | 6.204 × 10−3 | 4.853 × 10−2 | 3.268 × 10−2 | −1.061 × 10−2 |
p2 | −1.727 × 10−3 | −9.363 × 10−3 | −9.159 × 10−3 | 1.391 × 10−3 |
Serial Number | Hardware | Model |
---|---|---|
1 | Video cards | NVIDIA GeForce RTX 3060 (6G video memory) |
2 | CPU | AMD Ryzen7 5800H with Radeon Graphics |
3 | Memory stick 1 | Samsung DDR4(8G RAM) |
4 | Memory stick 2 | Micron Technology DDR4(8G memory) |
Serial Number | Name | Version Number |
---|---|---|
1 | System | Windows 10 |
2 | PyCharm | Community 2022.2.2 |
3 | Python | 3.8.16 |
4 | PyTorch | 1.12.1 |
5 | CUDA | 11.3 |
6 | CUDNN | 8.4.1.50 |
Algorithms | Classification | Precision (%) | Recall (%) | mAP (%) |
---|---|---|---|---|
YOLOv8 | All | 92.5 | 90.6 | 96.8 |
Vacant | 91.5 | 91.4 | 96.7 | |
Occupied | 93.4 | 89.8 | 96.9 | |
YOLOv7 | All | 90.2 | 91.5 | 95.2 |
Vacant | 89.1 | 92.3 | 95.8 | |
Occupied | 91.4 | 90.8 | 94.7 | |
YOLOv5 | All | 93.7 | 92.1 | 96.6 |
Vacant | 93.5 | 92.7 | 96.8 | |
Occupied | 93.9 | 91.6 | 96.4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhang, X.; Zhao, W.; Jiang, Y. Study on Parking Space Recognition Based on Improved Image Equalization and YOLOv5. Electronics 2023, 12, 3374. https://doi.org/10.3390/electronics12153374
Zhang X, Zhao W, Jiang Y. Study on Parking Space Recognition Based on Improved Image Equalization and YOLOv5. Electronics. 2023; 12(15):3374. https://doi.org/10.3390/electronics12153374
Chicago/Turabian StyleZhang, Xin, Wen Zhao, and Yueqiu Jiang. 2023. "Study on Parking Space Recognition Based on Improved Image Equalization and YOLOv5" Electronics 12, no. 15: 3374. https://doi.org/10.3390/electronics12153374