Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Image Classification with Convolutional Neural Network (CNN)

This repository contains a simple Convolutional Neural Network (CNN) implementation for image classification. The model is trained to classify images of planes and cars into their respective categories.

Table of Contents

Introduction

The goal of this project is to demonstrate a basic image classification pipeline using a CNN. The model architecture and training setup are kept simple for illustration purposes. It classifies images into two categories: planes and cars.

Dependencies

To run this project, you need the following dependencies:

  • Python (>=3.6)
  • Keras (>=2.0)
  • NumPy
  • Pandas

Installation

  • Clone the repository to your local machine.
git clone https://github.com/your_username/your_project.git
  • Install the required dependencies using pip.
pip install keras numpy pandas

Usage

After installing the dependencies, you can use the provided Jupyter Notebook or Python script to train the model, evaluate its performance, and make predictions on new images.

Dataset

The dataset used for training and testing the model is stored in the 'train' and 'test' directories, respectively. It contains images of planes and cars organized in separate subdirectories.

Model Architecture

The CNN model architecture is as follows:

  • Input layer (224x224x3)
  • Conv2D layer with 32 filters, kernel size (2,2), and ReLU activation
  • MaxPooling2D layer with pool size (2,2)
  • Conv2D layer with 32 filters, kernel size (2,2), and ReLU activation
  • MaxPooling2D layer with pool size (2,2)
  • Conv2D layer with 64 filters, kernel size (2,2), and ReLU activation
  • MaxPooling2D layer with pool size (2,2)
  • Flatten layer
  • Dense layer with 64 units and ReLU activation
  • Dropout layer with 0.5 dropout rate
  • Dense output layer with 1 unit and sigmoid activation

Training

  • To train the model, run the following command:
python train.py
  • You can modify the training parameters in the script as needed.

Evaluation

The model's performance can be evaluated using the following command:

python evaluate.py
  • This will provide accuracy and loss metrics on the test dataset.

Prediction

To make predictions on new images, use the following command:

python predict.py path/to/your/image.jpg
  • This will output the predicted class (plane or car) and the corresponding confidence score.

Results

  • After training the model, you can find the results and evaluation metrics in the 'results' directory.

Contributing

  • If you would like to contribute to this project, feel free to open an issue or submit a pull request.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages