Skip to content

ISHOOO/Anidex-Image-Classifier

Repository files navigation

Anidex Image Classifier

Anidex Image Classifier is a Convolutional Neural Network model built using TensorFlow, Keras, NumPy, and Matplotlib libraries in Python. It classifies images of 90 different species from the animal kingdom.

Overview

The Anidex Image Classifier project aims to classify images of various animal species using deep learning techniques. Inspired by the concept of the Pokédex from Pokémon, this model can predict the species of an animal from an input image.

Demonstration link:

Anidex - hugging face spaces

Model Details

  • Inspiration: Inspired by the concept of Pokédex from Pokémon.
  • Validation Accuracy: The model achieves a validation accuracy of 37.04%.
  • Animal Classes: It can predict among 90 different animal species, including antelope, badger, bat, bear, and many others.
  • Architecture
    • Convolutional layers (relu activation)
    • 2D-Maxpooling layers
    • Dropout layers (Dropout rate: 0.2)
    • Flattening layer
    • Dense layers for output

Libraries Used

The model is implemented using the following Python libraries:

  • TensorFlow: An open-source machine learning framework developed by Google that is used for building and training neural networks. Used to provide core functionalities for defining and training the Convolutional Neural Network model used in the project.

    Tensorflow

  • Keras: An open-source neural network library written in Python, designed to enable fast experimentation with deep neural networks. Used as a high-level API running on top of TensorFlow, simplifying the process of building and training the deep learning model.

    Keras

  • NumPy: A fundamental package for scientific computing in Python, providing support for arrays, matrices, and many mathematical functions. Used in the project for handling image data and performing various numerical operations required during data preprocessing and augmentation.

    Numpy

  • Matplotlib: Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. It has been used in the project to visualize the training process, such as plotting training and validation accuracy, and displaying images during prediction.

    matplotlib

Features

  • Data Augmentation: Utilizes data augmentation techniques to increase the diversity of training data and improve model generalization.
  • Callbacks: Implements callbacks such as Learning Rate Scheduler and Early Stopping to optimize model training and prevent overfitting.
  • Optimizer: Adam optimizer is used for optimizing model parameters.
  • Loss Function: Sparse Categorical Crossentropy is employed as the loss function for multi-class classification.

Usage

To modify this project:

  1. Clone this repository:
git clone "https://github.com/ISHOOO/Anidex-Image-Classifier.git"
  1. Ensure Python dependencies are installed
pip install numpy matplotlib tensorflow

Visualizations

Training and Validation Accuracy Comparison

Training vs Validation Accuracy

Performing Prediction on Unseen Data

Prediction Example 1 Prediction Example 2

Files Included

  • data_split.py: Python script to split the 'animals data' directory into 'train' and 'valid' directories by 75% and 25% respectively.
  • anidex.keras: Pre-trained model weights file.
  • predict.py: Python script to perform predictions on new images.
  • unseen test data: unseen images taken from an external source to test the generalizability of the model
  • Animal_recognition.ipynb: Jupyter notebook containing script for model training

Dataset

The dataset used for training and validation can be found on Kaggle:

List of animals which can be predicted by the model:

  1. antelope
  2. badger
  3. bat
  4. bear
  5. bee
  6. beetle
  7. bison
  8. boar
  9. butterfly
  10. cat
  11. caterpillar
  12. chimpanzee
  13. cockroach
  14. cow
  15. coyote
  16. crab
  17. crow
  18. deer
  19. dog
  20. dolphin
  21. donkey
  22. dragonfly
  23. duck
  24. eagle
  25. elephant
  26. flamingo
  27. fly
  28. fox
  29. goat
  30. goldfish
  31. goose
  32. gorilla
  33. grasshopper
  34. hamster
  35. hare
  36. hedgehog
  37. hippopotamus
  38. hornbill
  39. horse
  40. hummingbird
  41. hyena
  42. jellyfish
  43. kangaroo
  44. koala
  45. ladybugs
  46. leopard
  47. lion
  48. lizard
  49. lobster
  50. mosquito
  51. moth
  52. mouse
  53. octopus
  54. okapi
  55. orangutan
  56. otter
  57. owl
  58. ox
  59. oyster
  60. panda
  61. parrot
  62. pelecaniformes
  63. penguin
  64. pig
  65. pigeon
  66. porcupine
  67. possum
  68. raccoon
  69. rat
  70. reindeer
  71. rhinoceros
  72. sandpiper
  73. seahorse
  74. seal
  75. shark
  76. sheep
  77. snake
  78. sparrow
  79. squid
  80. squirrel
  81. starfish
  82. swan
  83. tiger
  84. turkey
  85. turtle
  86. whale
  87. wolf
  88. wombat
  89. woodpecker
  90. zebra

Feel free to explore and contribute to the Anidex Image Classifier project!

About

A CNN model to classify images of 90 different species from the animal kingdom.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published