Uneven illumination has a significant impact on vision-based automatic parking systems, making it impossible to conduct a correct assessment of parking places in the presence of complicated picture data. In to address this issue, this work provides a deep learning-based system for visual recognition of parking spaces and picture processing. Artificial intelligence (AI) approaches can be used to identify a less expensive and easier-to-implement solution to the parking spot identification challenge, especially since the discipline of deep learning is reshaping the world. Using deep learning techniques, this study offers a dynamic, straightforward, and cost-effective algorithm for the detection of parking spots. In order to determine which parking spots are available and which are occupied, this method employs a Masked Region Based Convolutional Neural Network (MR-CNN) and the intersection over union approach. Cars in the training dataset were spaced more apart than those actually seen, which increased the accuracy of the identification between cars and parking spots. The AOA mechanism enhances the model's ability to focus on relevant regions within an image, improving accuracy in detecting parking spaces. This leads to precise identification of parking slots, reducing false positives and negatives. The sequence and quantity of parking spots, as well as the capacity to predict empty spots, were tested in a case study and found to be accurate. In the experimental results as the AOA based MR-CNN model stretched the accuracy as 98.50 and the recall value as 40.59 then the precision as 96.34 F1-measure as 57.95 correspondingly.