Automatic Estrus Cycle Identification System on Female Dogs Based on Deep Learning
- 84 Downloads
Vaginal cytology is a complementary economic method and of simple realization, an indicative to determine in which stage of the estrous cycle the dog is, to achieve a higher fertility and fertility rate. This method is based on determining the type and quantity of cells of the different stages of the estrous cycle, since the hormonal changes that the vaginal mucosa undergoes during the estrous cycle are shown in the morphology of its epithelial cells. The canine female in her reproductive life goes through different phases of activity and hormonal rest that are repeated cyclically. This is called the estrous cycle and consists of 4 stages: proestrus, estrus, diestrus and anestrus. The interpretation of vaginal cytology’s, is a process to which a considerable amount of time is dedicated by its observation in the microscope and the same interpretation by the doctor which can become subjective and poorly performed, causing economic losses for the owners. Therefore, this work proposes an automatic system that will identify six types of cells and the quantity of them in the glass slide, based on a Faster R-CNN to determine in which stage of the estrous cycle the dog is. Our results show an accuracy of 91.6%. The proposed system will improve the efficiency and speed of cytology’s to decreased from 1 h approximately to just a few seconds.
KeywordsVaginal cytology Estrous cycle Faster R-CNN Deep learning Cells
Dogs have always been a fundamental pillar in the different facets of people’s lives. Hence the importance of dogs in society, not only to go for a walk with them but for other beneficial activities, such as: search and rescue, medical pets, emotional support, hunting, grazing and protection. The goal of every living being is the perpetuation of its species. To achieve this, they must fulfill the function of reproducing, which consists in the ability of every living being to produce another similar individual. This function becomes a transcendent biological fact of great importance for the survival of the species, since it perpetuates life beyond the individual .
The canine female in her reproductive life goes through different phases of activity and hormonal rest that are repeated cyclically. This is called the estrous cycle which consists of 4 stages: proestrus, estrus, diestrus and anestrus . The first estrus appears in female dogs between the first 6 and 10 months of their life and then they experience a new ovarian cycle approximately every 6 months. Canine infertility can derive from multiple etiologies, but statistically the rejection of the mating or the bad synchronization ovulation-mount, represent approximately 80% of the failures of reproduction in this species. Although artificial insemination resolves the rejections of the mating, it will not be successful, if it is not done at the right time, being currently the vaginal cytology as the best way to determine that moment .
Vaginal cytology is the most applied procedure to verify the status of the female reproductive system. Despite this method being old, it is preferred due to its remarkable scope, it is practical, fast and economical, and it can be done by any specialized veterinary professional. The study consists of introducing a clean swab - preferably sterilized - in the vagina of the female. Subsequently, epithelial cells should be analyzed under a microscope to find out the status of the female dog’s reproductive system. However, this analysis can be very time-consuming and tedious, since the doctor will count and classify the cells seen in the microscope manually, consuming approximately 1 h for each study performed.
Under these conditions, we have been interested in detecting the dog’s estrous cycle using an automatic system based on convolutional neural networks, mainly in the Faster Region-based CNN (R-CNN) . The objective of this work is to detect, classify and count the 6 different types of cells that will be seen in the microscope in a faster and more efficient way, and thus get to know the state of the estrous cycle where the female dog is. Unlike another estrous cycle identification proposal , in which the system classifies the estrous cycle directly from the input image, our proposed system provides the number of different types of cells, which indicates the female dog’s estrous cycle. In this sense, our proposal provides reasons about the final classification decision to expert.
This paper is organized as follows: Sect. 2 a brief review of deep learning in veterinary medicine. Section 3 shows the methodology of the proposed system and the creation of the database. In Sect. 4, we provide some experimental results. Finally, Sect. 5 concludes this paper.
2 Deep Learning in Veterinary Medicine
In some aspects, veterinary medicine can be compared with the human medicine. Many basic laboratory tests are still too expensive for pet owners or simply not feasible due to the lack of automated methods and the large number of different species.
An example would be the white blood cell count (WBC). In human medicine, this is one of the most basic blood tests and is performed almost every time blood is drawn. On the other hand, in birds and reptiles, this laboratory test must be done manually (unlike humans, the red blood cells in birds and reptiles have a nucleus that interferes with most automated counting methods). However, due to the large number of different species and the morphological differences in their white blood cells, this test can only be performed by specialists in this field and, therefore, is rarely used in practice .
This emerging technology could provide a solution to this and other similar problems in veterinary medicine. In recent years, deep learning applications have been used to solve several problems in medical imaging, resulting in an improvement over previous generation results . So far, to name just a few, this technique has been used in tumor detection, blood flow quantification, brain image analysis and pathology images . In some cases, these deep learning techniques even surpassed humans in these tasks .
Unfortunately, despite its successful use in human medicine, deep learning applications are still lacking in veterinary imaging. It is argued that this should change, because not only deep learning can allow more accurate, faster and less expensive diagnoses in veterinary medicine and it can even be used easily by any veterinarian .
Currently there are studies conducted by the Faculty of Veterinary Medicine of Zagreb in Croatia, which decided to implement deep learning in a real-world task in veterinary medicine that is usually done manually, in this scope they counted the percentage of reticulocytes in cats  and also in  authors classify the estrus cycle in rats by using features of whole image and transfer learning.
3.2 Faster R-CNN Method for Identification of Cells
3.3 Estrus Identification Automatic System on Female Dogs
There are several architectures for feature extraction widely used for classification tasks such as Resnet-101, Resnet-50, Inception V2, Vgg16, Vgg19 and so on. The aim of this scope is to achieve a high performance by using low computational resources in the shortest amount of time, therefore the Vgg16 architecture is chosen as the backbone for the Faster R-CNN. This feature extractor consists in 13 convolutional layers which have proven to be enough. For the training, 70% of the images were fed into the network along with their bounding boxes previously segmented by the experts.
Approximate cell percentages for each stage of the canine estrous cycle .
For the detection the Faster R-CNN was used with the Vgg16 feature extractor as previously discussed, for the training parameters we used the stochastic gradient descent with momentum optimizer with a L2 regularization of 0.0005 and a momentum of 0.900, the model was trained in two stages for a total of 300 epochs, with an initial learning rate of 0.001 during 200 epochs and then with a learning rate of 5e−8 for 100 epochs, the mini-batch size was set to 1. These parameters depend on the feature extractor chosen, for our scope these showed the best performance.
Performance of the detection of cells
Type of cell
Red blood cells
Demonstration of cell count for a previously diagnosed cytology.
Number of new samples for evaluation by an expert and our proposed system
Detection rate %
In this paper a new system to identify the estrus cycle of a female dog is proposed, it is based on a Faster R-CNN detection model with the Vgg16 as feature extractor. In general, it achieved an accurate prediction of the different types of cells, except in red blood cells, which although it is not necessary to decide the classification of the estrus cycle, it might be of great importance to detect any anomaly different from our objective. On the other hand, in the test of the complete system the experts are still better to classify, the difference with our system lies in the time to classify the estrus cycle, being 5 s, which is much faster compared to approximately 1 h that the expert takes. The results have shown that our proposed approach in this classification task is effective and accurate. However, we still need to improve the robustness of our method by increasing the size of the database. It is worth noting that our proposed system provides the number of different types of cells to determine the estrus cycle, which is the same procedure performed by experts, and then the proposed system can be expanded easily for any other purposes, such as determine some specific diseases of dogs.
- 1.Galina, C., Valencia, J.: Reproducción de animales domésticos, 3ª. edn. Ed. Limusa, México D.F. (2008)Google Scholar
- 2.Stornelli, M.A., Savignone, C.A., Tittareli, C.M., Stornelli, M.C.: Citología vaginal en caninos: metodología y aplicaciones clínicas. Revista Veterinaria Cuyana 1(1), 15–21 (2006). (Spanish)Google Scholar
- 3.Monachesi, M.: El ciclo sexual de la perra y la llegada a la pubertad. Mascotas Foyel, Facultad de Veterinaria de la Universidad de Buenos Aires (2010). Disponible en. http://www.foyel.com/paginas/2010/02/1252/el_ciclo_sexual_de_la_perra_y_la_llegada_a_la_pubertad/
- 4.Shaoqing, R., Kaiming, He., Girshick, R., Sun, J.: Faster R-CNN: towards real-time object detection with region proposal networks. In: Advances in Neural Information Processing Systems, vol. 28 (2015)Google Scholar
- 6.Vinicki, K., Ferrari, P., Belic, M., Turk, R.: Using Convolutional Neural Networks for Determining Reticulocyte Percentage in Cats, Croatia (2018)Google Scholar
- 7.Arsomngern, P., Numcharoenpinij, N., Piriyataravet, J., Teerapan, W., Hinthong, W., Phunchongharn, P.: Computer-aided diagnosis for lung lesion in companion animals from x-ray images using deep learning techniques. In: 2019 IEEE 10th International Conference on Awareness Science and Technology (iCAST), Morioka, Japan, pp. 1–6 (2019)Google Scholar
- 8.Nguyen, A., Pierre Jr., Y., Snapp-Childs, W., Birch, S.: Visualizing veterinary medical data sets with Jetstream. IUScholarWorks (2019)Google Scholar
- 10.Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: CVPR 2014 Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition, pp. 580–587 (2014)Google Scholar
- 11.Girshick, R.: Fast R-CNN. In: Proceedings of the IEEE International Conference on Computer Vision (2015)Google Scholar
- 12.Hernández, P.J.E., Fernández, R.F., Cortés, S.: Fundamento Teórico Prácticos De La Citología Exfoliativa En Medicina Veterinaria. Manual # 5, CBS. 5, UAM Xochimilco (2008)Google Scholar