Git Product home page Git Product logo

ann-project's Introduction

Fruit Classification using Neural Networks

Project Overview

The goal of this project is to classify different types of fruits using neural networks, specifically Fully Connected Feedforward networks. We will tackle the fruit classification problem using these neural networks, which we have learned about in our course.

In this problem, our input consists of four types of fruits, and the model needs to identify the fruits correctly. The dataset we will use is called "Fruit360." This dataset contains a diverse range of fruit types, with images captured in 360 degrees. However, for simplicity and to improve the algorithm's accuracy, we have selected only four fruit classes for this project.

In the dataset, each class comprises approximately 491 images with dimensions of 100x100 pixels. Considering the direct use of image pixels as the neural network's input would result in a large input layer with 10,000 neurons, making the network overly complex. To address this, we initially employ feature extraction techniques to extract 360 features. We then apply feature vector dimension reduction techniques, reducing the size to 102, which will serve as the input to our neural network.

The structure of the neural network is as follows:

Image 1

Formulas

In neural networks, the following formulas are commonly used for calculations:

Cost Function

The cost function (also known as the loss function) is used to calculate the error between the predicted output and the actual desired output. Cost-Function Formula

Gradient Descent

Gradient Descent is an optimization algorithm used to update the weights and biases of the neural network based on the calculated gradients. It is commonly used for minimizing the cost function. The general formula for gradient descent is:

Weight Update Formula

Output Calculation

Output Calculation Formula

Smaple Result:

We trained the neural network model using the following configuration:

  • Learning Rate: 0.5
  • Number of Samples: 200
  • Number of Epochs: 20
  • Accuracy: 99%

Here is the cost function output in each epoch of training the ann:

Image 1

ann-project's People

Contributors

shakibaam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.