# Machine Learning Models for Artist Classification of Cultural Heritage Sketches
## 2 Material and Methods
### Model Development
#### 2.3.2 Faster R-CNN Approach  
Faster R-CNN is a deep learning model architecture used for object detection in images and videos. It builds upon the foundation of earlier models, such as R-CNN (regions with CNNs), by addressing their limitations and achieving faster processing speeds.  
As the R-CNN approach required much work and customization, we needed to evaluate models with faster convergence and less customization to provide a faster time-to-convergence ratio. To reach our goal, we implemented the Faster R-CNN architecture as an object detector that focuses on strokes and suggests artist attribution. In order to present accurate results we do not take into account overlapping between detections but rather provide information for the evaluator about each stroke attribution leaving the decision to the human operator. This requirement led us to the more rapid implementation of pre-trained models using the TensorFlow model hub, where the Faster R-CNN implementation is predominant. This type of network was developed only two years after the proposal of R-CNN and provided better results for both the RPN and the convolutional part. The first proposal was made by [PERSON] in 2015 [31]. We employed a residual network [32] architecture with a Faster R-CNN implementation for this study.  
For this model, we used the _retinanet-resnet fpn-coco_ pre-trained model, which used the ResNet50 architecture [33]) with some customizations in terms of training parameters. We set the training to be split into training batches of 100 images, with a learning rate starting at 0.01 and a warmup of 0.05 (the warmup size was also 100 images). The learning rate type was _cosine_. The protobuf reader was used with a buffer of 20 images, thus reducing the latency for network calls. This model used the COCO annotation type, thus requiring the implementation of a converter function for the PascalVOC annotation file.  
The main benefit of using such pre-trained models is related to the overall accuracy and model optimization (such as the feature pyramidal network presented in the RetinaNet above the Resnet50 architecture). While such improvements are beneficial to most models, for our specific task, a special selection of algorithms suitable for the task at hand was needed before finding a better model. While using a specialized pre-trained model, the training steps made extensive use of checkpointing and resulted in a run that was not verbose.  
This model focused on the recognition of painters' pen strokes using edge detection, a technique for image segmentation and data extraction, with the following parameters: learning rate, 0.004; batch size, 4; param optimizer, Adadelta; 272 epochs or 151 epochs. This approach applies modern pre-trained models (thus making use of large training times and infrastructure provided by the model developers, enabling fewer training epochs) for feature extraction, allowing for faster image processing using the COCO tags extracted from previously generated PascalVOC files. This greatly reduced the training time (concerning reinforcement learning--QLearning). The limitations of this model were given by the existing hardware infrastructure, which quickly exhausted the available computational resources for more accurate results. The results were excellent, with an accuracy of **95.84%** when analyzing 1018 images belonging to five classes. The results can be found in Table 4. From the original datasets, several images were filtered out (from a total of 1064 images, 46 were discarded from the training, testing, and validation sets) due to mixed compositions (existing noise within the images).