## 3 Graffiti Identifier
### Graffiti Classifier  
As mentioned, the graffiti classifier aims to classify an image into one of three classes: image with illegal graffiti, image with street art, or image without graffiti. Since transfer learning involves the use of a pre-trained neural network, several architectures previously trained for image classification problems were tested, adding only four new training layers at the end:  
* A Flatten layer to transform the multi-dimensional output from the Keras application model into a single-dimension tensor. Figure 5: Summary of the implemented system. * A Dense layer. Three different activation functions were tested ('linear','relu', and 'tanh'). A Dense layer has a deep connection. In other words, all neurons in this layer are connected with all neurons from the previous layer, allowing it to learn information from all combinations of features from the previous layer. * A Dropout layer to prevent overfitting. * A Dense layer with a SoftMax activation function that allows the output to be converted into a probability distribution over the predicted output classes: illegal, street art, or without graffiti. The weights used in the tested architectures were obtained using the ImageNet dataset, a large dataset organized according to the WordNet hierarchy, comprising over 14 million images categorized into about 22 thousand different object categories. Although the images included here exhibit considerable differences relative to the images used in this research work (regarding graffiti), pre-trained networks with weights optimized for this large dataset can be useful as feature extractors. For example, a network that can already identify walls correctly can be a valuable contribution to the problem at hand, since graffiti is usually present on them. The pre-trained architectures tested on the scope of this research work were Resnet, EfficientNet, VGG, DenseNet, Xception, and InceptionResNet. The Resnet architectures use residual blocks (or \"skip connections\") to solve a problem often related to deeper networks, as a result of the vanishing gradient, as the number of layers in the neural network increases, the accuracy becomes saturated and starts to degrade after a certain point. These residual blocks behave as shortcut connections that perform identity mapping [25]. Two residual neural network architectures from this family were tested: ResNet50 and ResNet15V2. EfficientNet is a convolutional network architecture that uses a new scaling approach that uniformly scales all depth/width/dimensions using a composite coefficient [26]. The EfficientNetV2L and EfficientNetB7 architectures were used in the tests. The VGG network family is mainly characterized by its simplicity, which uses 3 \(\times\) 3 convolutional layers stacked on top of each other [27]. From this family, VGG19 was the pre-trained neural network evaluated. DenseNet201 was also compared with the remaining architectures. DenseNet uses dense interlayer connections via Dense Blocks. Each layer receives extra inputs from all previous layers and passes its own features to all following layers. InceptionResNetV2 is a convolutional neural architecture based on the Inception family of architectures, which incorporates residual connections [28]. Finally, Xception is also inspired by Inception architectures, but, instead of using full convolutions, it replaces the standard Inception modules with depth-wise separable convolutions [29]. In summary, eight neural networks were tested and compared:  
1. ResNet50
2. EfficientNetV2L
3. EfficientNetB7
4. VGG19
5. DenseNet201
6. Xception
7. ResNet15V2
8. InceptionResNetV2  
These network architectures were tested because they are all available in Keras applications and because of their good performance on general image classification problems. They usually have a strong capability of generalization for images and problems outside the ImageNet dataset [30].