Optimal deep learning based vehicle detection and classification using chaotic equilibrium optimization algorithm in remote sensing imagery

Machine Learning


In this study, we have introduced a new VDTC-CEOADL technique for the identification and classification of vehicles on high-resolution RSIs. The VDTC-CEOADL technique presented examined high-quality RSIs to precisely detect and classify different types of vehicle. The VDTC-CEOADL technique comprises several subprocesses: YOLO-HR based object detector, CEOA based hyperparameter tuning, and ALSTM based vehicle classification. Figure 1 illustrates the workflow of the VDTC-CEOADL method.

Fig. 1
figure 1

Workflow of the VDTC-CEOADL approach. The figure was created using Drawio tool. As the image is fully original and created by the authors, there is no copyright or licensing issue, and no permission document is required. The figure is eligible for publication under the CC BY 4.0 open access license.

Dataset Preparation

The proposed VDTC-CEOADL framework needed extensive dataset preparation for its implementation and evaluation using both VEDAI and ISPRS Potsdam datasets. The YOLO-HR model required 512 × 512 pixel resolution inputs so all remote sensing images received initial resizing for both compliance and computational optimization. A preservation of the aspect ratio method was used for the resizing process to prevent any distortion. The pixel values received normalization to the [0, 1] range for improving the numerical stability throughout the learning process. Channel-wise normalization was implemented by deducting the mean of each channel followed by dividing it with its standard deviation to boost training convergence performance.

Different data augmentation techniques were used for the detection model to improve generalization and prevent sample size overfitting. The model incorporated random image cropping for spatial variance and employed horizontal and vertical flipping at 0.5 probability together with brightness adjustments between ± 20% for lighting condition simulation. The object orientation diversity was expanded through small scaling operations (0.9 to 1.1) and rotational adjustments (± 10 degrees). The model gained additional robustness against noise through the intentional addition of Gaussian noise in particular samples. The augmentation methods operated dynamically throughout training to extend data diversity without requiring additional storage capacity.

The VEDAI dataset presented annotations through XML format containing bounding boxes with labels whereas the ISPRS Potsdam dataset provided pixel-level semantic segmentation masks. All annotations received conversion to YOLO format for pipeline compatibility with YOLO-HR detection framework by standardizing each bounding box with normalized class ID and center coordinates along with width and height specifications. The semantic masks in the ISPRS dataset underwent processing to generate bounding boxes that defined vehicle objects. The cleaning process focused on eliminating duplicated annotations while removing wrong boxes and incorrect labels from the dataset. All datasets received uniform class labels for maintaining consistent training conditions.

A patch-wise segmentation approach was implemented because the ISPRS Potsdam dataset includes large orthophoto tiles of 6000 × 6000 pixels resolution. The YOLO-HR model required input sizes of 512 × 512 pixels so each big tile received this partitioning into separate non-overlapping areas. Vehicle information loss prevention was achieved through a sliding window approach which utilized 20% overlapping between neighboring windows. The training and testing process included vehicle instance-bearing patches whose annotations properly matched the segmented areas. The patch-wise method created for segmentation served both to lower processing demands and to enhance the detection performance of vehicles especially when detecting compact objects.

Object detector using the YOLO-HR model

The YOLO-HR model is utilized in this work. YO-LO-HR is an object detection network for high-resolution RSIs. The network is divided into Head, Backbone, and Neck22. The fundamental architecture of Backbone is a ResNet and convolution module at its core. The basis of deep ResNet was to present a deep residual learning model in the network. Compared to the characteristic that the stacked layer of CNN, including VGG16, is better suited for the preferred underlying mapping, ResNet makes the layer fit for residual mapping.

The ResNet encompassed the sequence of residual blocks:

$$\:x\_(l+1)=x\_l+F(x\_l,W\_l\:)$$

(1)

In Eq. (1), x_l and x_(l + 1) denote input and output, and F(x_l, W_l) refers to a residual part and represents the gap among the observed and predicted values. Usually, the network layer is expressed as = H(x), and the residual block belonging to the residual network is represented as H (x) = F (x) + x, i.e., in the unit mapping, y = H (x) are observed values, but the predicted value of H (x), hence F(x) corresponds to the residual named ResNet. The number of feature maps of x_l and x_(l + 1) is not identical in the convolution network, and the 1 × 1 convolution is required for dimension reduction or elevation. Subsequently, the image of data enhancement was placed in the retrieved convolutional and network modules channel that then integrated with the Conv model using the kernel size = 6. They have interconnected with PANet in Neck after that feature enhancement model called SPPF23.

Bidirectional feature fusion was assumed to improve the network detection ability. The conv2d layer independently scales the fused feature layer for generating the multilayer output. The NMS technique integrated the output of each single-layer detector to produce the last detection frame. Conv includes a Silu activation function, 2D convolution layers, and BN layer, C3 includes two 2D convolution layers along with the bottleneck layer, and Up sample denotes the up sampling layer. The ECA is effectively implemented by 1D convolution of size k to capture local cross-channel interaction data after channel-level global average pooling without dimensionality reduction, considering the connection of every channel with neighbors k. The CA attention module encodes every channel along the vertical and horizontal axes, correspondingly using the channel-level global average pooling of size (H,1) or (1, W) pooling kernels. The abovementioned two transformations gather feature alongside both spatial directions for producing two direction-aware feature maps later modified and concatenated by the sigmoid and convolution functions for the attention output.

CEOA based hyperparameter tuning

In this study, the CEOA is used to optimally modify the hyperparameters of the YOLO-HR model. The original EOA is a metaheuristic approach related to physics to manage consistent optimization difficulties24. The EOA is a newly developed metaheuristic approach that takes advantage of an equilibrium pool and candidate to upgrade the particle. The EOA depends on the analytic solution process for the dynamic mass balance over the control volume. The EOA prevents being trapped in the local optima and has greater exploration and exploitation abilities. The benefit of EOA has been made possible by the concept of generation rate. The equation of mass balance is analytically resolved, producing the following result:

$$\:C=C\_eq+(C\_0+C\_eq\:).F+G/\lambda\:V\:(1-F)$$

(2)

In Eq. (2), V can be regarded as 1 as a volume unit. The EOA produces an equilibrium pool having 4 candidates and other averaged ones:

$$\:C\_(eqs,pool)=\{C\_eqs(0)\:,C\_eqs(1)\:,C\_eqs(2)\:,C\_eqs(3)\:,C\_ave\:\}$$

(3)

$$\:C\_ave=(C\_(eqs\left(0\right))+C\_(eqs\left(1\right))+C\_(eqs\left(2\right))+C\_(eqs\left(3\right)\left)\right)/4$$

(4)

The fitness value of the candidate in the equilibrium pool must satisfy the subsequent rules for the issue indicated by f.

$$\:f(C\_eqs(0\left)\:\:\right)\le\:f(C\_eqs(1\left)\:\:\right)\le\:f(C\_eqs(2\left)\:\:\right)\le\:f(C\_eqs(3\left)\right)$$

(5)

EOA exploits the initializing and iterating methods as another bio-inspired algorithm while resolving problems, they come from real engineering work or specified as benchmark. The EOA continues the exploration and exploitation process while iterating. To enhance the performance, there exist many operations to construct the EOA. Assume that the presented problem is limited by the symmetric or asymmetric range with [lb, ub] and that the candidate of the swarm is uniform across the domain. To accomplish this, the pseudorandom random value r_1 is presented:

$$\:C\_i=lb+(ub-lb).{r}_{1}$$

(6)

The location vector for the i-th candidate is C_i. Then, the position of the candidate for the subsequent iteration would be important for the three stages, as shown in Eq. (2). C_eq represents a random selection of candidates from the swimming pool construction with Eq. (3) for the initial stages. There exists an exponential variable F for the second part of the Eq. (2) that can be defined:

$$F = a_{1} sign(r_{2} – 0.5)(e\hat{}( – \lambda t) – 1)$$

(7)

In Eq. (7) a_1 denotes a constant variable that controls the exploration abilities along with parameters that divide the exploiting and exploring procedures. The higher the value of a_1, the greater the possibility for the candidate to perform exploration, and the lesser the possibility for the candidate to perform exploitation. For convenience and experience, a_1 = 2.r_2 is another random integer within [0,1], and t denotes the variable expressed to be related to the iteration time.

$$t = \left( {1 – iter/\left( {max\;Iter} \right)\;} \right)\hat{}\left( {\left( {a\_2\;iter/max\;Iter} \right)} \right)$$

(8)

Equation (8) iter signifies the existing number of iterations, and maxIter denotes the maximum iterations restricted initially.

The parameter G refers to the generation rate that increases the exploitability of the candidate. The generation rate was proportional to an exponential parameter that was shown below:

$$\:G\_o=GCP(C\_eq-\lambda\:C)$$

(9)

$$\:GCP\:=\left\{\left(0.5,\&{r}_{2}\ge\:GP@0,\&{r}_{2}\ge\:GP\right)\right\}$$

(10)

Where GP represents generation probability set as 0.5 to accomplish the best outcomes in balancing the possibility in-between exploitation and exploration. Upgrading rules of EO are given below:

$$\:C=C\_eq+(C-C\_eq\:).F+G/\lambda\:V\:(1-F),$$

(11)

In Eq. (11), F is determined in Eq. (7) and V is regarded as a unit. CEOA is derived by the integration of EOA with chaotic maps. A chaotic system has the features of ergodicity and randomness25. A variety of populations are produced by applying those features, thus speeding up the convergence rate and enhancing the performance of the model. Rather than the arbitrarily generated population, it was applied to the chaotic map, which produces the initial population, making it easier for them to escape from local optima and improving the performance of the whale algorithm. Presently, various chaotic maps exist in the optimization field, primarily involving Gauss, logistic, and tent maps. The study exploits the logistic map for generating the initial population:

$$\:x\_(i+1)=\mu\:x\_i\:(1-x\_i)\:,i=\text{1,2},\&,N-1$$

(12)

In Eq. (12), µ is 4, x_1 represents the random integer within [0,1], and N represents the individual population number. The position of the initial population produced by the logistic map was normal distribution of population location associated with the arbitrarily produced that increases the population diversity and extends search space of hawks in space. For the specific range, it improves the limitations of EOA that it can be easier to be trapped in local optimum. Fitness selection was a decisive factor in the CEOA approach. The encoding of the solution was exploited to judge the aptitude of the candidate solution. Here, the accuracy value was the main condition leveraged to model a fitness function.

$$\:Fitness\:=\:max\:\left(P\right)$$

(13)

$$\:P=\left(true\:positive\:\right)/(true\:positive\:+false\:positive\:)$$

(14)

Sub-su3.3. Vehicle Classification using the ALSTM Model At the final stage, the class labels of the detected vehicles can be identified using the ALSTM model. Hochreiter and Schmidhuber project LSTM as the key to the problem of gradient disappearance26. LSTM was planned to adaptably control learned features’ storage length and illustrates optimum outcomes in the Seq2Seq problem. To solve this problem that RNNs could not learn data in long data orders, the LSTM nodes include a novel state value c, termed cell state, and its function saves the input data far away in the present moment, that is, long-term memory. The structure named gates is fixed in the LSTM node for removing or adding data to the c cell state. Gates can be fully connected (FC) layers with outcomes between zero and one. Usually, the LSTM node is the following 3 kinds of gates that upgrade and control cell states: output, forget, and input. The forget gate manages those data from cell state to forget, whose output was provided by subsequent formula:

$$f\hat{}\left( {\left( t \right){\text{~}}} \right) = \varphi \left( {w\_f{\text{~}}\left[ {h\hat{}\left( {\left( {t – 1} \right){\text{~}}} \right),x\hat{}\left( {\left( t \right){\text{~}}} \right){\text{~}}} \right] + b\_f{\text{~}}} \right)$$

(15)

Whereas b_f defines the bias vector of the forgetting gate, w_f refers to the weighted matrix of the forget gate, h ((t-1)) implies the output of the hidden state of the preceding time step, [,] denotes 2 cascading vectors, x (
(16)

in which w_i represents the weighted matrix and b_i indicates the bias vector. The resultant of the input gate i defines if the candidate value C created by the novel input is along with the cell state or not and can be formulated as:

$$C^{ \sim } \hat{}\left( {\left( t \right)} \right) = tanh\left( {w\_c\left[ {h\hat{}\left( {\left( {t – 1} \right){\text{~}}} \right),x\hat{}\left( {\left( t \right){\text{~}}} \right)} \right] + b\_c{\text{~}}} \right)$$

(17)

whereas b_c and w_c denote the equivalent bias vector and weight matrix. The cell state of the current moment step c(
(18)

In which, implies the multiplying equivalent elements of 2 vectors.The output gate controls that the data encoder of the cell state was assigned to the network as the output of the hidden state. The outcome of the output gate was provided as follows:

$$0\hat{}\left( {\left( t \right){\text{~}}} \right) = \varphi \left( {w\_o{\text{~}}\left[ {h\hat{}\left( {\left( {t – 1} \right){\text{~}}} \right),x\hat{}\left( {\left( t \right){\text{~}}} \right){\text{~}}} \right] + b\_o{\text{~}}} \right)$$

(19)

Whereas w_o denotes the weighted matrix, b_o implies the bias vector, and 0 signifies the resultant of the output gate. The LSTM layers resultant vector was provided as:

$$\:{h}^{\left(t\right)}={0}^{\left(t\right)}\odot\:tan\:h\left({c}^{\left(t\right)}\right)$$

(20)

In which h(
(21)