## 3 Results
### Background Effects  
The first experiment attempts to evaluate the influence of the image background in the deep model training step with a publicly available image set that offers labelled images with objects masks. This image set is 'pets' [29] and it has 200 images for each class of pet: 37 classes. The images have large variations in scale, positioning and lighting, since objects have different sizes, positions in the image and illumination. Masks are available and they allow the easy separation of cats and dogs from image backgrounds by using 2D computer vision algorithms. The aim is to train several deep learning models under different frameworks to check if the performance varies depending on the image background features. Several frameworks are tested. One framework uses cats and dogs in images with original backgrounds. Another framework takes cats and dogs alone, in images with a flat background, in the same position and orientation as the original image. The third framework utilizes data augmentation capabilities by creating new images with combinations of cats and dogs, including occlusions, varying positions and scale. The experiment uses both flat and original backgrounds, as shown in the images in Figure 3. The first and second rows show original data from the pet image set. The third row shows objects on a flat background, created with a combination of images from the first and second rows. The fourth row shows the results of a data augmentation technique: several objects are in the image and occlusions exist. The fifth row is the resulting mask with occlusions. Figure 3: Image set used to test background variations. First row shows images with original backgrounds. Second row shows masks resulting from the labelling process. Third row shows images with flat backgrounds. Fourth and fifth rows show results with data augmentation techniques with resulting masks. All of these operations were carried out using 2D computer vision techniques. Training several models allows for the comparison of their results. From this comparison, conclusions can be drawn about how image background influences the training stage of a deep neural network model. In this case, the selected models are SSD-MOBILENET, SSD-RESNET, FASTER-RCNN-RESNET and FASTER-RCNN-INCEPTION. In general, RCNN models offer better results but they are more time-consuming than SSD models. For applications where time is crucial and accuracy is not so important, it is advisable to use SSD models. Tensorflow library [30] is used and models are available in \"detection model zoo\" [31]. Tensorflow provides models trained to work with the COCO image set. The provided weights are the training pipeline for the pet detection model. In fine-tuning, the final layer of the model is retrained only because the fine-tuning of deeper layers degrades the performance. The parameters are optimized with the cross-entropy loss function using the stochastic gradient descent (SGD) algorithm. In the optimization, mini batches of size 10 are used. Figure 4 shows how model losses decrease with the number of epochs and training data. Variations in training time over the training data sets are not significant. Training data changes with each experiment (original images, flat background, data augmentation and data augmentation with flat background). Table 1 shows measures, such as precision and recall, of performances of the models. Models are restored at epoch 2500 and then run with training and testing data. 180 images per class are used for training, and 20 images are used for testing purposes. Figure 4: Models loss decreases with the number of epochs. Training data have no significant effects on the evolution of the training process. Images with original backgrounds are always used for testing data. The first set of rows in Table 1 shows the detection rates from the training data, with different models in columns and different sets of images arranged in rows. The second set of rows of Table 1 is equal to the first rows of Table 1 but with testing data included.