Skip to content

TenzinDhonyoe/Image-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ImageClassifier

ImageClassifier is a Python project utilizing Convolutional Neural Networks (CNNs) to classify images into ten different categories. This project uses the CIFAR-10 dataset, which includes images of airplanes, cars, birds, cats, deer, dogs, frogs, horses, ships, and trucks. The model is built using TensorFlow and Keras with a simple yet effective architecture to ensure high accuracy and performance.

Prerequisites

Before running this project, you'll need to have the following installed:

  • Python
  • TensorFlow
  • OpenCV (cv2)
  • NumPy
  • Matplotlib

Installation

Clone the repository to your local machine:

git clone https://github.com/yourusername/ImageClassifier.git

Navigate to the cloned directory:

cd ImageClassifier

Install the required packages:

pip install -r requirements.txt

Dataset

The project uses the CIFAR-10 dataset, automatically loaded via TensorFlow's dataset module. It includes 60,000 32x32 color images in 10 different classes, with 6,000 images per class. The dataset is divided into 50,000 training images and 10,000 testing images.

Model

The neural network model consists of three convolutional layers followed by max pooling layers, a flattening layer, and two dense layers. The model uses the ReLU activation function for its hidden layers and softmax for its output layer, optimizing the sparse categorical crossentropy loss function with the Adam optimizer.

Training

The model is trained on a subset of 20,000 images from the training set for efficiency and tested on a subset of 4,000 images from the test set. It undergoes training over 10 epochs to adjust weights for accurate predictions.

Prediction

The model can classify images into one of the ten CIFAR-10 categories. It preprocesses the images by converting them to RGB, normalizing their pixel values, and resizing them to fit the input shape of the model before making predictions.

Usage

To classify your images, place them in the project directory and run the main script:

python image_classifier.py

Ensure your images are named appropriately (e.g., horse.jpg, car.jpg, etc.) as the script includes a predefined list of image filenames to process.

Contributions

Contributions are welcome! If you'd like to improve the model, add features, or report a bug, please feel free to open an issue or a pull request.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages