



Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Prepara tus exámenes
Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Prepara tus exámenes con los documentos que comparten otros estudiantes como tú en Docsity
Encuentra los documentos específicos para los exámenes de tu universidad
Estudia con lecciones y exámenes resueltos basados en los programas académicos de las mejores universidades
Responde a preguntas de exámenes reales y pon a prueba tu preparación
Consigue puntos base para descargar
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Comunidad
Pide ayuda a la comunidad y resuelve tus dudas de estudio
Ebooks gratuitos
Descarga nuestras guías gratuitas sobre técnicas de estudio, métodos para controlar la ansiedad y consejos para la tesis preparadas por los tutores de Docsity
A deep learning-based classification model designed to differentiate between 'fake coral' and 'real coral' snake species. The model achieves a high accuracy of over 90% after 40 epochs, utilizing conv2d, maxpooling2d, dense, flatten, and dropout layers from tensorflow's keras module. The dataset consists of taxonomic species associated with each category, sourced from official herpetology databases. The model is deployed using a flask server and a react vite frontend, with axios for image analysis.
Tipo: Monografías, Ensayos
1 / 6
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!




1 Software Engineering Student. Surcolombiana University. Email: [email protected] *(Corresponding author)
Received date: May 2023 Revision date: XXXX 202X Approval date: XXXX 202X
Abstract.This project presents the design and implementation of a deep learning-based classification model for differentiating between ”Fake Coral” and ”Real Coral” snakes (two classes). It utilizes a sequential architecture and includes Dropout layers from TensorFlow’s Keras module, such as Conv2D, MaxPooling2D, Dense, and more. Furthermore, the dataset consists of taxonomic species associated with each category, sourced from official herpetology databases, ensuring the validity and reliability of the images. The model achieved a final accuracy above 90% after 40 epochs, using the ’adam’ optimizer, Binary Crossentropy loss function, and accuracy as the evaluation metric. Additionally, a Flask server, integrated with Flask-CORS and PyMongo, is used to consume the model, while a React Vite frontend interfaces with the server using Axios for image analysis. It is important to note that the model resizes and rescales the images during analysis, contributing to its accurate classification performance.
Keywords. Deep learning · Classification model · Fake Coral · Real Coral · Image analysis
The accurate identification of snake species plays a crucial role in ecological studies, conservation efforts, and public safety. This study presents a deep learning-based classification model designed to differentiate between two categories of coral snakes: ”Fake Coral” and ”Real Coral”. Taxonomic species associated with each category were carefully selected. The taxonomic species consid- ered as ”Fake Coral” include Lampropeltis elapsoides, Lampropeltis Triangulum, and Calliophis bivirgatus. The ”Real Coral” category comprises Micrurus nigrocinctus, Micrurus alleni, and Micrurus mosquitensis. A meticulously curated dataset was constructed by sourcing images of these species from official herpetology databases, ensuring the validity and reliability of the dataset. The deep learning model was implemented using a sequential architecture, leveraging Conv2D, MaxPool- ing2D, Dense, Flatten, and Dropout layers from the TensorFlow’s Keras module. The model was trained to accurately classify the snake images, achieving a final accuracy exceeding 90% after 40 epochs. The model was compiled using the ’adam’ optimizer, the Binary Crossentropy loss function, and accuracy as the evaluation metric. To deploy the model, a Flask server was developed, enabling the consumption of the exported ’.h5’ model file. The Flask server, implemented in Python, incorporated Flask-CORS to handle cross-origin requests and PyMongo to store classification records. On the frontend, an interface was built using React Vite, and requests were made to the Flask server using Axios. The image data was transformed to base64 format on the frontend and transmitted in the request to the Flask server. The server then converted the base image back to bytes for analysis by the model. During analysis, the model performed necessary resizing and rescaling of the images. This research represents a significant advancement in utilizing deep learning techniques for the accurate classification of coral snakes. By leveraging official herpetology databases and employing a robust model
architecture, the proposed approach demonstrates promising results in differentiating between ”Fake Coral” and ”Real Coral” snake species. The achieved high accuracy underscores the effectiveness of this methodology and its potential applications in snake species identification. Furthermore, in the literature review conducted for this study, no existing advancements addressing the exact same problem were found. This emphasizes the novelty and originality of the proposed approach in classifying coral snake species accurately.
The images for this study were carefully curated to ensure reliable and valid examples of the target snake species. Taxonomic species associated with the ”Fake Coral” category included Lampropeltis elapsoides, Lampropeltis triangulum, Lampropeltis gentilis, and Calliophis bivirgatus. On the other hand the ”Real Coral” category comprised Micrurus nigrocinctus, Micrurus alleni, and Micrurus mosquitensis. Images of these species were sourced from official herpetology databases, guaranteeing the authenticity of the dataset. The official herpetology databases utilized in this study included The Reptile Database, HerpMapper, Am- phibiaWeb, and iNaturalist.
(a) Fake coral examples from dataset. (b) Real coral examples from official websites.
Figure 1: Comparison of fake and real coral examples.
The deep learning model utilized a sequential architecture implemented with the TensorFlow’s Keras module. The architecture consisted of Conv2D, MaxPooling2D, Dense, Flatten, and Dropout layers. Conv2D layers were responsible for feature extraction, followed by MaxPooling2D layers for downsampling. Dense layers were used for classification, while Dropout layers helped prevent overfitting.
The curated dataset was divided into three subsets: training, validation, and testing. The division was performed as follows: 70% of the data was allocated for training, 20% for validation, and 10% for testing. In addition, the ’train test split’ function from the scikit-learn library was utilized on this data, to ensure a random and stratified split, maintaining the class distribution across the subsets.
Upon receiving an image request, the Flask server converted the base64 image back to bytes for analysis by the trained model. The model performed necessary preprocessing tasks, such as resizing and rescaling, to ensure compatibility with the model’s input dimensions. The model then classified the image as either ”Fake Coral” or ”Real Coral” based on its learned features and provided the corresponding classification result.
Figure 3: User interface making a prediction.
As mentioned before, the performance of the classification model was assessed using various evaluation metrics, including accuracy, precision, recall, and binaryaccuracy. Confusion matrices were generated to analyze the model’s classification results and assess potential errors or misclassifications.
The experimental setup involved the implementation and evaluation of the deep learning-based classification model for distinguishing between ”Fake Coral” and ”Real Coral” snakes. The following details describe the experimental setup:
The taxonomic species associated with each category were carefully selected as mentioned before.
The deep learning model was implemented using a sequential architecture. It included layers such as Conv2D, MaxPooling2D, Dense, Flatten, and Dropout from the TensorFlow’s Keras module. The dataset was divided into three sets: 70% for training, 20% for validation, and 10% for testing. The model was trained using the Adam optimizer, Binary Crossentropy loss function, and accuracy as the evaluation metric. Furthermore, the training process involved 40 epochs and other hyperparameters auto-selected by the tools described.
To deploy the trained model, a Flask server was developed. The Flask server, implemented in Python, utilized Flask-CORS to handle cross-origin requests and PyMongo to store classification records. On the frontend,
an interface was built using React Vite, and requests were made to the Flask server using Axios.
The experimental setup described above outlines the process of dataset collection, model architecture, training, and deployment. These details provide a comprehensive understanding of the experimental frame- work and the tools utilized to develop and evaluate the deep learning-based classification model for this issue.
The deep learning-based classification model for distinguishing between the two classes was evaluated using various metrics and performance measures. The experimental results and their implications are discussed below:
The trained model exhibited impressive classification performance, achieving a final accuracy greater than 90% on the test dataset. This high accuracy demonstrates the model’s ability to accurately differentiate between the two categories of coral snakes. Additionally, the precision, recall, and binaryAccuracy for each class were computed, indicating a balanced and reliable classification outcome. Here are the results:
(a) Accuracy graphics. (b) Loss graphics.
Figure 4: Performance results provided.
A comparative analysis was conducted to assess the performance of the proposed model in relation to related studies. While no exact replicas of the current study were found, several studies focused on snake species identification using different methodologies (such EfficientNet) and other species. The results obtained in this study outperformed those reported in similar studies, showcasing the efficacy of the deep learning approach for coral snake classification.
The use of carefully curated images from official herpetology databases played a crucial role in the model’s performance. By ensuring the validity and reliability of the dataset, the model was exposed to diverse and representative instances of each snake category, contributing to its robustness and accuracy.