# Towards Automatic Image Enhancement with Genetic Programming and Machine Learning
## 4 Experiments in Real Estate Image Marketing
### Experimental Results  
This section presents the results from the different approaches carried out to tackle the problem of real estate image marketing. Note that part of the validation of ELAINE, the GP engine, was already completed in a previous work [9]. A conclusion from the previous work was that making the objective only about aesthetics could sometimes yield overly transformed images. However, from the fitness function perspective, the results were correct, and optimizing the function, from a more practical perspective, the transformations to the input image turned them into something unrealistic and, in some cases, not suitable for this real estate image marketing problem. The experimentation started by evaluating the original dataset with the 4 _no-reference_ IQA methods in Table 2. After that, to have a criterion for all the future experiments, we measured the improvement achieved by _One-Click_, the external IE software, on the test dataset using all available metrics. In addition to this, we also conducted the same experience on a list of Classical functions, that we will name CL, manually arranged by us based on expertise and personal tastes, with the default parameterization. This list was as follows: _Contrast Balance_, _CLAHE_, _Unsharp Masking_, _Non-local means denoising_, _and Contrast Stretching_. These two experiments will be an essential \"cornerstone\" for the rest of the result analysis. The results are presented in Tables 2 and 3, and in Figure 7. For better readability, _NIMA_ models are abbreviated to respective initials, and _PhotoLike_ is abbreviated to _PHIL_. While interpreting the results, we will focus more on SSIM, rather than _MSE_, since SSIM gives a much more valid metric of similarity. Nonetheless, _MSE_ will still be presented, rounded to units. All of the results are presented in Table 3 and show the metrics improvement over the original images scores. Negative improvement means degradation of quality according to the respective metric. An output example of both methods is presented in Figure 8.  
In the GAN model, the positive class is the enhanced version of an input image that is considered as a target. Note that, following the original implementation, each image was resized to 256 by 256. The setup employed is that of the authors of Enlighten-GAN [8], while using our dataset. The model uses an Adam optimizer with a batch size of 32 trained 100 epochs with a learning rate of 0.0001 and another 100 epochs with linear learning rate decay until 0. Table 3 (rows GAN A and GAN B) shows the results for both trained models. We selected the model that showed the best performance in our metrics, GAN A, and performed all the subsequent tests using it. The first test we ran using this model was to apply the GAN over the original image. After the GAN, we applied the Classical functions introduced in Section 3.4. Table 3 shows these results (GAN + CL), and Figure 9 showcases a couple of examples of the combination of GAN and Classical functions. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline  & **Fit.** & **NIMA A.** & **NIMA T.** & **BRISQUE** & **PHIL** \\ \hline \(\mu\) & Original & 4.91 & 5.36 & 7.77 & 5.56 \\ \hline \(\sigma\) & Original & 0.45 & 0.43 & 1.15 & 1.41 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Average (\(\mu\)) and standard deviation (\(\sigma\)) of the original images from the test dataset using 4 _no-reference_ metrics. All of the metrics values range from 1 to 10, where 1 means the lowest quality, and 10 highest quality. Regarding the GP system, the pipeline can be constructed to optimize different metrics. In this work, three configurations, that differ only in the fitness function, were selected that use the following formulations:  
* **GP.A--(N.A. )** NIMA Aesthetic model: purely based on aesthetics. * **GP.B--(AVG(N.T. + N.A. ))**: a Average of both NIMA technical and aesthetic models, which takes into account image aesthetics, while balancing the technical part.