## 2 Methodology
### Particle Swarm Optimization (PSO) Approach  
For the feature extraction process, feature vectors are extracted by using the VGG-16 [33], VGG-19 [33], DenseNet [34] and ResNet_50 [35] networks. However, we could expect that not all the feature values at the output layers of the above networks are useful for the visibility estimation. Therefore, we propose to use particle swarm optimization (PSO) [36; 37; 38] method to select a subset of the output layers' feature values to form the feature vectors. For the \(i\times\) particle of the PSO method, \(\textbf{X}_{i}\) = [\(X_{i1}\), \(X_{i2}\), \(\dots\)\(X_{ik}\)... \(X_{im}\)], represents a subset of the whole set of the feature values generated at the last convolution  
Figure 2: Particle X\({}_{i}\) Evaluation process.  
output layer of the ANN. The mean absolute error (MAE) is used as a PSO fitness function (objective value) for the feature values' selection process:  
\[\Phi_{xi}=\frac{1}{N}\sum_{j=1}^{N}\bigl{|}e_{j}\bigr{|}=\frac{1}{N}\sum_{j=1}^{ N}\bigl{|}v_{j}-\vartheta_{j}\bigr{|} \tag{1}\]  
where \(N\) is the total number of testing data sample, \(e_{j}\) is the absolute error for the \(j\)th image, \(\vartheta_{j}\) and \(v_{j}\) are the estimated and the actual visibility of the \(j\)th image, respectively. For the \(i\)th PSO particle \(\mathbf{X}_{i}\), the feature vectors of each subregion (\(F_{jk}\)) are then generated for the images. The overall visibility \(\vartheta_{j}\) of the \(j\)th image is estimated based on the method in Figure 2. The fitness value of \(\mathbf{X}_{i}\) is then determined by Equation (1) and the binary PSO method [39] is used to select the best candidate of \(\mathbf{X}_{i}\). The position (\(\mathbf{X}_{i}\)) and velocity (\(\mathbf{V}_{i}\)) of \(i\)th particle are updated by:  
\[\mathbf{X}_{i}=[X_{i1},\,X_{i2},\,\dots\,\,X_{ik}\,\dots\,\,X_{in}],\qquad\quad X _{ik}\in\{0,1\} \tag{2}\]  
\[\mathbf{V}_{i}=[V_{i1},V_{i2},\,\dots\,\,X_{ik}\,\dots\,\,V_{in}] \tag{3}\]  
\[V_{ik}(t+1)=\omega V_{ik}(t)+C_{1}\,r_{1k}\,(P_{ik}-X_{ik})+C_{2}\,r_{2k}\,(P_{ gk}-X_{ik}) \tag{4}\]  
\[X_{ik}(t+1)=X_{ik}(t)+V_{ik}(t+1),\,i=1\dots\,N_{p} \tag{5}\]  
where:  
* \(P_{i}\) and \(\Phi_{ibest}\) are its own best experience, position and objective value.
* \(P_{g}\) and \(\Phi_{gbest}\) are best experience of the whole swarm, position and objective value.
* \(\omega\) is the inertia weight, \(C_{1}\) and \(C_{2}\) are cognitive and social acceleration coefficients.
* \(r_{1d}\) and \(r_{2d}\) are random numbers in [0,1]. \(N_{p}\) is the population size.
* \(X_{ik}\in\{0,1\}\), \(X_{ik}=1\Rightarrow\) the \(k\)th feature value is selected in the \(i\)th particle, the total number of \"1\" in \(X_{i}\) vector is kept constant at 80% of maximum feature dimension (\(n\)).  
It is expected that the set of feature vectors maps to the visibility value of \(v_{j}\). The step-by-step procedures for the PSO method are summarized as follows.  
1. Initialize the particles' velocities \(\mathbf{V}_{i}\) and positions \(\mathbf{X}_{i}\).
2. Updated particles' \(\mathbf{V}_{i}\) velocities and positions \(\mathbf{X}_{i}\) by Equations (4) and (5).
3. Compare the estimated visibility (\(\vartheta_{j}\)) with the actual visibility (\(v_{j}\)) for all the database images (\(j=1\,\dots\,\,N\)). Compute the objective values \(\Phi_{Xi}\) for each particle \(\mathbf{X}_{i}\) by Equation (1).
4. Update the best position \(P_{i}\) and the best objective value \(\Phi_{ibest}\) for each particle \(\mathbf{X}_{i}\).
5. Update the global best position \(P_{g}\) and the global best objective value \(\Phi_{gbest}\).
6. Go back to step 2 to 5 for updating cycle until maximum generation is reached.  
The fitness function of the PSO process is designed to select an optimal subset of the feature values at the last convolution output layer of the ANN. The selected feature values will be used to form the feature vectors for the visibility estimation.