Skip to content

Classifying various Felis species from images using deep learning techniques

Notifications You must be signed in to change notification settings

polaternez/felis-image-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Felis Image Classification: Project Overview

This project builds a deep learning model to automatically classify various Felis species from their images.

  • Utilizing the Felis Taxonomy Image Classification dataset from Kaggle.
  • Performing data preprocessing and image augmentation to enhance model generalization.
  • Employing transfer learning technique on a pre-trained model for improved accuracy.
  • Developing a user-friendly Flask API for real-time species prediction based on image inputs.

Code and Resources Used

Python Version: 3.10
Packages: numpy, pandas, matplotlib, tensorflow, tensorflow_datasets, flask, pillow
Flask API Setup:

  • pip install -r requirements.txt
  • conda env create -n <ENVNAME> -f environment.yaml (Anaconda Environment)

Dataset: https://www.kaggle.com/datasets/datahmifitb/felis-taxonomy-image-classification/data

Getting Data

The project utilizes the Felis Taxonomy Image Classification dataset from Kaggle, containing 519 JPG images of seven Felis species:

  • Domestic cat (F. catus)
  • European wildcat (F. silvestris)
  • Jungle cat (F. chaus)
  • African wildcat (F. lybica)
  • Black-footed cat (F. nigripes)
  • Sand cat (F. margarita)
  • Chinese mountain cat (F. bieti)

alt text

Data Preprocessing

  • Data Split: The dataset was divided into 80% for training and 20% for testing to ensure the model learns well and is tested fairly..
  • Image Preprocessing:
    • Resizing: All images were resized to 224x224 pixels to keep them consistent.
  • Image Data Augmentation: To make the model more adaptable and prevent it from overfitting, these techniques were applied:
    • Image Rotation
    • Image Translation
    • Image Flipping
    • Contrast Adjustment

Model Building

The model is based on a pre-trained EfficientNetB0 model adapted through transfer learning with the following architecture:

alt text

Model Evaluation

The model's performance is measured using categorical cross-entropy and optimized using the ADAM algorithm. The results are as follows:

alt text

Productionization

A user-friendly API is developed using Flask. The API receives image inputs and returns the predicted Felis species.

alt text

About

Classifying various Felis species from images using deep learning techniques

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages