Revealing the Unknown: Real-Time Recognition of Galápagos Snake Species Using Deep Learning
Abstract
:Simple Summary
Abstract
1. Introduction
2. Materials and Methods
2.1. R-CNN Structure
2.1.1. Training the RPN
2.1.2. Training the Detection Layer
2.2. R-CNN Implementation
2.2.1. Inception V2
2.2.2. ResNet
2.2.3. MobileNet
2.2.4. VGG16
2.3. Workflow towards Training the Image Classifier
2.3.1. Installation of Libraries
2.3.2. Data Collection
2.3.3. Data Preprocessing
2.3.4. Modeling
3. Results
3.1. Inception V2
3.2. ResNet
3.3. MobileNet
3.4. VGG16
4. Discussion
- Image dataset was limited. There were not enough images available for each species to train the model. Two hundred thirty images to train a deep learning model is not enough to achieve good accuracy. Image data augmentation could be a remedy in this case, though it requires additional deep-domain skills in deep learning, image processing, and computer vision. Image data augmentation would allow us to significantly increase the data set size and diversity of images, providing the options of image modification by turning, flipping, padding, cropping, brightening, or darkening the object and background in the image.
- There were a few images with complex backgrounds in which separating the snake from its surroundings was difficult. To resolve this issue, removing the backgrounds in images would significantly improve the results, however, the solution to automate the background removal for hundreds of thousands of images would have to be provided. Recent scientists’ achievements reveal that there is a promising background removal method called DOG, created by Fang et al. [34,35], used alongside VGG-DCGAN to increase the effectiveness of image classification. The method is based on CNN and created from the original model Tiramisu (One Hundred Layers Tiramisu) [36], however, with fewer layers leading to a better performance. Lastly, transfer learning can be utilized to deal with complex backgrounds in images, which allows for incorporation of knowledge previously gained from other models into current models. This would improve the accuracy and performance of the model, since it is leveraging knowledge gained from previous trained models.
4.1. Future Scope: From a Data Science Perspective
4.2. Future Scope: From a Software Development Perspective
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
References
- Márquez, C.; Cisneros-Heredia, D.F.; Yánez-Muñoz, M. Pseudalsophis Biserialis. The IUCN Red List of Threatened Species, 2017. Available online: http://dx.doi.org/10.2305/IUCN.UK.2017-2.RLTS.T190541A56253872.en (accessed on 1 March 2020).
- Márquez, C.; Cisneros-Heredia, D.F.; Yánez-Muñoz, M. Pseudalsophis Dorsalis. The IUCN Red List of Threatened Species, 2016. Available online: http://dx.doi.org/10.2305/IUCN.UK.2016-1.RLTS.T190538A56261413.en (accessed on 1 March 2020).
- Cisneros-Heredia, D.F.; Márquez, C. Pseudalsophis Hoodensis. The IUCN Red List of Threatened Species, 2017. Available online: http://dx.doi.org/10.2305/IUCN.UK.2017-2.RLTS.T190539A54447664.en (accessed on 1 March 2020).
- Márquez, C.; Yánez-Muñoz, M. Pseudalsophis Occidentalis. The IUCN Red List of Threatened Species, 2016. Available online: http://dx.doi.org/10.2305/IUCN.UK.2016-1.RLTS.T190540A56267613.en (accessed on 1 March 2020).
- Arteaga, A.; Bustamante, L.; Vieira, J.; Tapia, W.; Guayasamin, J.M. Reptiles of the Galápagos; Tropical Herping: Quito, Ecuador, 2019; p. 208. [Google Scholar]
- Zaher, H.; Yánez-Muñoz, M.H.; Rodrigues, M.T.; Graboski, R.; Machado, F.A.; Altamirano-Benavides, M.; Bonatto, S.L.; Grazziotin, F. Origin and hidden diversity within the poorly known Galápagos snake radiation (Serpentes: Dipsadidae). Syst. Biodivers. 2018, 16, 614–642. [Google Scholar] [CrossRef]
- Krizhevsky, A.; Sutskever, I.; Hinton, G. ImageNet Classification with Deep Convolutional Neural Networks. Adv. Neural Inf. Process. Syst. 2012, 25, 84–90. [Google Scholar] [CrossRef]
- LeCun, Y.; Boser, B.; Denker, J.S.; Henderson, D.; Howard, R.E.; Hubbard, W.; Jackel, L.D. Backpropagation applied to handwritten zip code recognition. Neural Comput. 1989, 1, 541–551. [Google Scholar] [CrossRef]
- Sergyan, S. Color content-based image classification. In Proceedings of the 5th Slovakian-Hungarian Joint Symposium on Applied Machine Intelligence and Informatics, Poprad, Slovakia, 25–26 January 2007; pp. 427–434. [Google Scholar]
- Hernandez-Serna, A.; Jimenez, L. Automatic identification of species with neural networks. PeerJ 2014, 2. Available online: https://peerj.com/articles/563/ (accessed on 1 March 2020).
- Amir, A.; Zahri, N.A.H.; Yaakob, N.; Ahmad, R.B. Image Classification for Snake Species Using Machine Learning Techniques. In Computational Intelligence in Information Systems; Phon-Amnuaisuk, S., Au, T.W., Omar, S., Eds.; CIIS 2016. Advances in Intelligent Systems and Computing; Springer: Cham, Switzerland, 2017; Volume 532, pp. 52–59. [Google Scholar]
- Dangtongdee, K.D. Plant Identification Using Tensorflow; California Polytechnic State University: Luis San Obispo, CA, USA, 2018; Available online: https://digitalcommons.calpoly.edu/cpesp/264 (accessed on 1 March 2020).
- Python: An All-in-One Web Crawler, Web Parser and Web Scrapping Library! Available online: https://github.com/hardikvasa/webb (accessed on 1 March 2020).
- Racer. Tropical Herping. Available online: https://www.tropicalherping.com/science/books/reptiles/reptiles_galapagos/colubridae.html (accessed on 1 March 2020).
- Goswami, S. A Deeper Look at How Faster R-CNN Works, 2018. Available online: https://medium.com/@whatdhack/a-deeper-look-at-how-faster-rcnn-works-84081284e1cd (accessed on 1 March 2020).
- Gao, H. Faster R-CNN Explained, 2017. Available online: https://medium.com/@smallfishbigsea/faster-r-cnn-explained-864d4fb7e3f8 (accessed on 1 March 2020).
- Girshick, R. Fast R-CNN, 2015. Available online: https://arxiv.org/pdf/1504.08083.pdf (accessed on 1 March 2020).
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks, 2016. Available online: https://arxiv.org/pdf/1506.01497.pdf (accessed on 1 March 2020).
- Chen, X.; Gupta, A. An Implementation of Faster RCNN with Study for Region Sampling, 2017. Available online: https://arxiv.org/pdf/1702.02138.pdf (accessed on 31 January 2020).
- Raj, B. A Simple Guide to the Versions of the Inception Network, 2018. Available online: https://towardsdatascience.com/a-simple-guide-to-the-versions-of-the-inception-network-7fc52b863202 (accessed on 1 March 2020).
- ResNet, AlexNet, VGGNet, Inception: Understanding Various Architectures of Convolutional Networks, 2018. Available online: https://cv-tricks.com/cnn/understand-resnet-alexnet-vgg-inception/ (accessed on 1 March 2020).
- Szegedy, C.; Liu, W.; Jia, Y.; Sermanet, P.; Reed, S.; Anguelov, D.; Erhan, D.; Vanhoucke, V.; Rabinovich, A. Going Deeper with Convolutions, 2014. Available online: https://arxiv.org/abs/1409.4842v1 (accessed on 1 March 2020).
- Szegedy, C.; Vanhoucke, V.; Ioffe, S.; Shlens, J.; Wojna, Z. Rethinking the Inception Architecture for Computer Vision, 2015. Available online: https://arxiv.org/abs/1512.00567 (accessed on 1 March 2020).
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition, 2015. Available online: https://arxiv.org/abs/1512.03385 (accessed on 1 March 2020).
- Nigam, I. Exploring the Structure of Residual Neural Networks, in Mathematical Fundamentals for Robotics, 2016. Available online: http://www.cs.cmu.edu/~jia/16-811/16-811.html (accessed on 17 January 2019).
- Jordan, J. An Overview of Object Detection: One-Stage Methods, 2018. Available online: https://www.jeremyjordan.me/connet-architectures/ (accessed on 17 January 2019).
- Hollemans, M. MobileNet Version 2, 2018. Available online: https://machinethink.net/blog/mobilenet-v2/ (accessed on 1 March 2020).
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition, 2015. Available online: https://arxiv.org/pdf/1409.1556.pdf (accessed on 1 March 2020).
- Murphy, J. An Overview of Convolutional Neural Network Architectures for Deep Learning, 2016. Available online: https://pdfs.semanticscholar.org/64db/333bb1b830f937b47d786921af4a6c2b3233.pdf (accessed on 1 March 2020).
- Flickr. Available online: https://www.flickr.com/ (accessed on 17 January 2019).
- Schramer, T. Galapagos Racer. HerpMapper, 2016. Available online: https://www.herpmapper.org/record/165402 (accessed on 17 January 2019).
- Mejia, D. Galápagos: la culebra de Floreana y el centenario misterio de su ausencia en su isla. Mongabay, 2017. Available online: https://es.mongabay.com/2017/05/ecuador-galapagos-culebra-de-floreana-misterio/ (accessed on 17 January 2019).
- Mangersnes, R. Galapagos Racer Snake. Nature Picture Library. Available online: https://www.naturepl.com/search?s=galapagos+snake (accessed on 10 April 2020).
- Fang, W.; Ding, Y.; Zhang, F.; Sheng, V. DOG: A New Background Removal for Object Recognition from Images. Neurocomputing 2019, 361, 85–91. [Google Scholar] [CrossRef]
- Fang, W.; Ding, Y.; Zhang, F.; Sheng, J. Gesture recognition based on CNN & DCGAN for calculation and text output. IEEE Access 2019, 7. Available online: https://ieeexplore.ieee.org/document/8653825 (accessed on 10 April 2020).
- Jégou, S.; Drozdzal, M.; Vazquez, D.; Romero, A.; Bengio, Y. The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation, 2017. Available online: https://arxiv.org/abs/1611.09326 (accessed on 10 April 2020).
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection, 2016. Available online: https://arxiv.org/pdf/1506.02640.pdf (accessed on 1 March 2020).
Color Space | Color Description | Classification Based On |
---|---|---|
RGB | Moments of R channel | Lightness |
XYZ | Moments of Z channel | Lightness, blue color |
xyz | Moments of x channel | Red color |
xyz | Moments of z channel | Blue color |
YCbCr | Moments of Y channel | Lightness |
YCbCr | Moments of Cb channel | Blue color |
YCbCr | Moments of Cr channel | Red color |
HSV | Moments of H channel | Number of colors |
HSV | Moments of S channel | Sharp and blurred colors |
HSV | Moments of V channel | Lightness |
Opponent space | Moments of 1 channel | Blue and red colors |
Opponent space | Moments of 2 channel | Blue color, sharp and blurred colors |
RGB | Moments | Lightness, blue color |
YCbCr | Moments | Lightness, blue color |
HSV | Moments | Darkness, blue color |
rgb | Histogram | Blue and green colors |
rgb | CCV | Lightness |
xyz | CCV | Lightness, blue and green colors |
YCbCr | CCV | Blue color |
Opponent space | CCV | Blue color |
Classifier | Correct Prediction | Recall | Precision | F-Measure |
---|---|---|---|---|
Naïve Bayes | 75.64 | 0.92 | 0.94 | 0.93 |
Backpropagation neural network | 87.93 | 1 | 0.99 | 0.99 |
Nearest neighbors | 89.22 | 1 | 0.96 | 0.97 |
K-NN (k = 7) | 80.34 | 1 | 0.96 | 0.97 |
Decision tree J48 | 71.29 | 0.79 | 0.71 | 0.72 |
File Name | Width | Height | Class | xmin | ymin | xmax | ymax |
---|---|---|---|---|---|---|---|
14924394811_c505bc3d_o.jpg | 3497 | 2332 | P. biserialis | 1002 | 625 | 3497 | 2015 |
151761_5-Galapagos.jpg | 600 | 500 | P. occidentalis | 41 | 65 | 554 | 442 |
16081314279_c833e990_b.jpg | 1024 | 683 | P. slevini | 164 | 269 | 698 | 412 |
182611421_cba87acd82_o.jpg | 3648 | 2736 | P. biserialis | 449 | 673 | 3166 | 2166 |
Pseudalsophis Snake Species | Training Set Images | Test Set Images | Total Images |
---|---|---|---|
P. biserialis | 27 | 5 | 32 |
P. darwini | 10 | 2 | 12 |
P. dorsalis | 23 | 4 | 27 |
P. hephaestus | 8 | 1 | 9 |
P. hoodensis | 23 | 3 | 26 |
P. occidentalis | 58 | 10 | 68 |
P. slevini | 6 | 1 | 7 |
P. steindachneri | 16 | 3 | 19 |
P. thomasi | 40 | 7 | 47 |
Total: | 211 | 36 | 247 |
R-CNN Model | Accuracy |
---|---|
ResNet | Around 75% |
Inception V2 | Around 70% |
VGG16 | Around 70% |
MobileNet | Around 10% |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Patel, A.; Cheung, L.; Khatod, N.; Matijosaitiene, I.; Arteaga, A.; Gilkey, J.W., Jr. Revealing the Unknown: Real-Time Recognition of Galápagos Snake Species Using Deep Learning. Animals 2020, 10, 806. https://doi.org/10.3390/ani10050806
Patel A, Cheung L, Khatod N, Matijosaitiene I, Arteaga A, Gilkey JW Jr. Revealing the Unknown: Real-Time Recognition of Galápagos Snake Species Using Deep Learning. Animals. 2020; 10(5):806. https://doi.org/10.3390/ani10050806
Chicago/Turabian StylePatel, Anika, Lisa Cheung, Nandini Khatod, Irina Matijosaitiene, Alejandro Arteaga, and Joseph W. Gilkey, Jr. 2020. "Revealing the Unknown: Real-Time Recognition of Galápagos Snake Species Using Deep Learning" Animals 10, no. 5: 806. https://doi.org/10.3390/ani10050806
APA StylePatel, A., Cheung, L., Khatod, N., Matijosaitiene, I., Arteaga, A., & Gilkey, J. W., Jr. (2020). Revealing the Unknown: Real-Time Recognition of Galápagos Snake Species Using Deep Learning. Animals, 10(5), 806. https://doi.org/10.3390/ani10050806