In day-to-day activities, the advanced technology like Internet of Things (IoT) emerges to improve the lifestyle of people. In metropolitan cities, real-time parking is the long-lasting problem that we face in our daily life activities. Urban parking regulation gained more attention because of its capability to diminish energy consumption, congested traffic, and manifestation. The parking space detection for vehicles in real-time is a crucial role for on-street parking control models where the data is delivered to the drivers through internet with the help of Global Positioning System (GPS). Hence, the network congestion gets increased, where the existing model does not performed well in the parking space effectively. This research paper recommends a novel strategy for detecting occupancy in road traffic parking by IoT and deep networks to overcome these difficulties. At first, the required information is gathered from the standard datasets as CNRPark + EXT for further processing. After the data collection process, the preprocessing phase is executed, where the data cleaning and data transformation approaches are done with a multi-scale retinex network. The pre-processing technique is effectively performed to reduce background noise. Further, the feature extraction is progressed through the Residual Attention Network, where the relevant features are extracted from the pre-processed data. Subsequently, the optimal features and weights are selected by the novel Advanced Pelican Optimization Algorithm (APOA) to get the optimal weighted feature selection. This optimal weighted feature is further given to the Ensemble Deep Networks (EDN) by integrating the Deep Conditional Random Field (DCRF), and Extreme Deep Learning (EDL) model. In final process, the detection of occupancy in road traffic parking is determined by averaging both classifiers outcomes. Finally, the results are compared with numerous optimization algorithms and classifiers to ensure the developed system's efficacy. Throughout the validation, the developed model outperforms with an accuracy as 96.6, precision as 92.9 and Mathew's Correlation Coefficient (MCC) as 92.3. Thus, the developed model shows better performance than the existing traditional approaches.