Skip to content

Main repository for a Kaggle machine learning competition, concerning the creation of a classification model for various butterfly spiecies. These include Black Swallowtail (Papilio polyxenes), Monarc (Danaus plexippus) and Viceroy (Limenitis archippus).

License

Notifications You must be signed in to change notification settings

Attornado/yum-or-yuck-butterfly-classification

Repository files navigation

Contributors Forks Stargazers Issues Apache License 2.0

YoY Challenge 2022: Yum or Yuck Butterfly Classification 2022

Main repository for a Kaggle machine learning competition, concerning the creation of a classification model for various butterfly spiecies. These include Black Swallowtail (Papilio polyxenes), Monarc (Danaus plexippus), Pipevine Swallowtail (Battus philenor), Spicebush Swallowtail (Papilio troilus), Eastern Tiger Swallowtail (Papilio glaucus) and Viceroy (Limenitis archippus).


Table of Contents
  1. About The Project
  2. Technologies
  3. License
  4. Acknowledgments

About The Project

This neural network-based computer vision project is aimed at classifying six different species of butterflies spread in various parts of the planet. The system was developet to participate in a Kaggle challenge, known as Yum or Yuck Butterfly Mimics 2022. The ultimate goal of the latter is the development of reliable systems for automatic butterfly recognition in order to order to be able to conduct detailed studies on the distribution and populations of these insect species, some of which are considered endangered. The results obtained with some state-of-the-art convolutional systems are encouraging despite the limitations of the available hardware, achieving about 94%/95% accuracy on the test set.

Network architecture

YoYNet

alt-text

ButterflyNet

alt-text

Confusion matrix of the best model (binary)

alt-text

Confusion matrix of the best model (complete)

alt-text

Results

# Size/Version Freeze pre-trained weights Dense dimension Bias regularizer
1 B0 $\left[512, 128, 6\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$
2 B0 No $\left[512, 256, 6\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$
3 B2 No $\left[512, 6\right]$ $\left[L_1: 10^{-6}, -\right]$
4 B1 No $\left[512, 256, 6\right]$ $\left[L_2: 10^{-5}, L_2: 10^{-5}, -\right]$
5 B1 No $\left[512, 6\right]$ $\left[ -, -\right]$
6 B1 No $\left[512, 512, 6\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$
7 B1 No $\boldsymbol{\left[512, 256, 6\right]}$ $\boldsymbol{\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]}$
8 B1 No $\left[512, 512, 6\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$
9 VGG19 No $\left[512, 6\right]$ $\left[-, -\right]$
10 VGG19 No $\left[512, 256, 6\right]$ $\left[ L_1: 10^{-6}, L_1: 10^{-6}, -\right]$
11 VGG16 No $\left[512, 256, 6\right]$ $\left[L_1: 10^{-5}, L_1: 10^{-5}, -\right]$
12 VGG16 No $\left[512, 6\right]$ $\left[L_2: 10^{-5},-\right]$
# Weight regularizer Activation regularizer
1 $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$ $\left[-, L_1: 10^{-6}, L_1: 10^{-6}\right]$
2 $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$ $\left[-, L_1: 10^{-6}, L_1: 10^{-6}\right]$
3 $\left[L_1: 10^{-6}, -\right]$ $\left[-, L_1: 10^{-6}\right]$
4 $\left[L_2: 10^{-5}, L_2: 10^{-5}, -\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, L_1: 10^{-6}\right]$
5 $\left[L_1: 10^{-6}, -\right]$ $\left[-, -\right]$
6 $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, L_1: 10^{-6}\right]$
7 $\boldsymbol{\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]}$ $\boldsymbol{\left[L_1: 10^{-6}, L_1: 10^{-6}, L_1: 10^{-6}\right]}$
8 $\left[L_1: 10^{-5}, L_1: 10^{-6}, -\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6}, L_1: 10^{-6}\right]$
9 $\left[-, -\right]$ $\left[-, -\right]$
10 $\left[L_1: 10^{-6}, L_1: 10^{-6}, -\right]$ $\left[L_1: 10^{-6}, L_1: 10^{-6},
11 $\left[L_1: 10^{-5}, L_1: 10^{-5}, -\right]$ $\left[L_1: 10^{-5}, L_1: 10^{-5}, L_1: 10^{-5}\right]$
12 $\left[L_2: 10^{-5}, -\right]$ $\left[-, L_1: 10^{-6}\right]$
# Optimizer $\boldsymbol{\eta}$
1 Adadelta 1
2 Adadelta 1
3 Adadelta 1
4 Adam $3 \cdot 10^{-7}$
5 Adadelta 1
6 Adadelta 1
7 Adadelta 1
8 Adadelta, Adam 1, $3 \cdot 10^{-7}$
9 Adam $3 \cdot 10^{-7}$
10 Adam $3 \cdot 10^{-7}$
11 Adam $3 \cdot 10^{-7}$
12 Adam $3 \cdot 10^{-6}$
# Precision Recall Accuracy F1-score
1 88.30% 88.51% 89.78% 88.11%
2 91.18% 91.28% 91.25% 91.24%
3 92.58% 92.25% 92.70% 92.40%
4 86.74% 86.55% 86.55% 86.28%
5 92.10% 91.23% 91.23% 91.21%
6 94.88% 93.97% 94.15% 94.12%
7 96.64% 96.49% 96.49% 96.48%
8 94.30% 94.15% 94.74% 94.68%
9 83.58% 83.34% 83.63% 82.27%
10 90.69% 90.97% 90.64% 90.47%
11 88.82% 88.08% 88.89% 87.89%
12 88.30% 88.66% 88.89% 88.26%

Complete project report (italian language)

Link

(back to top)

Technologies

Deep learning models

  • Keras
  • TensorFlow

Preprocessing and data management

  • Pandas
  • Numpy
  • SK-learn
  • OpenCV

Data visualization

  • Matplotlib

License

Distributed under the Apache License 2.0 License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

About

Main repository for a Kaggle machine learning competition, concerning the creation of a classification model for various butterfly spiecies. These include Black Swallowtail (Papilio polyxenes), Monarc (Danaus plexippus) and Viceroy (Limenitis archippus).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages