Giter Club home page Giter Club logo

anommudita / bachelor-thesis-project-ml-based-conveyor-belt-for-detecting-separating-rotten-fruits Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ierolsen/bachelor-thesis-project-ml-based-conveyor-belt-for-detecting-separating-rotten-fruits

0.0 0.0 0.0 915 KB

This repo contains my bachelor thesis project which is a conveyor belt system that detects and separates rotten fruits using machine learning.

License: GNU General Public License v3.0

Python 90.54% Jupyter Notebook 9.46%

bachelor-thesis-project-ml-based-conveyor-belt-for-detecting-separating-rotten-fruits's Introduction

Bachelor Thesis Project: Conveyor Belt System for Detecting and Separating Rotten Fruits

This repository contains my Bachelor Thesis Project that is a conveyor belt system which detects and separates rotten fruits. The project combines machine learning and mechanical engineering to achieve the goal of reducing food waste in the food industry.

ayırma_GIF


Youtube Video

By clicking the thumbnail below, you can watch the video on Youtube.

The Youtube Video


Project Overview

The conveyor belt system has been designed using SolidWorks, the 3D CAD file can be found in this repository (note: some parts may have been changed during assembly).

diagram2

kod_sema

The system uses a camera to stream real-time video of fruits passing along the conveyor belt, and the images are processed using PIL and OpenCV to predict the freshness of each fruit.

VIDEO_SCREEN_JPG

The prediction model is based on the transfer learning model Xception, which has been trained using Keras. The model has achieved a validation loss of 0.00265.

080223_training

If a fruit is detected as rotten, the real-time database on Firebase is updated. A Raspberry Pi continuously receives the data from Firebase, and if the value of run is True, a DC motor is activated to separate the rotten fruit. The numbers of rotten and fresh fruits are updated in the database.

motor_gif1 motor_gif2

Using Qt Designer, a GUI has been designed to display the numbers of fresh and rotten fruits, which continuously receives data from the Firebase database.

GUI_


Dataset

The dataset used for this project can be found on Kaggle: https://www.kaggle.com/datasets/sriramr/fruits-fresh-and-rotten-for-classification

The dataset contains six classes: "rotten apple", "rotten banana", "rotten orange", "fresh apple", "fresh banana", and "fresh orange". Although the dataset only contains these specific fruits, the model is able to recognize other types of fruits, such as quince, outside of the dataset after combining all classes together as rotten and fresh.


Requirements

The required libraries for this project are listed in the requirements.txt file. Please note that the file is only intended for Windows OS.

For Raspberry Pi, the following libraries are required:

  • rpi.gpio
  • Pyrebase

Please note that Pyrebase only works on Python 3.6. It does not work on newer versions of Python.

Installation

To install the required libraries for Windows OS, run the following command:

conda create -n env_name python=3.6
activate env_name
pip install -r requirements.txt

NOTE: In order to create the Database on Firabase, first create a python file named firebase_secrets inside of the motor folder. This created python file must contain the configuration keys that you can get on Firebase. Then the code will be ready to create a Database on Firebase.

Running the Codes

Be sure that you have already installed the requirements into the environment that existed.

GUI:

python app.py

Main Code:

python run.py

Raspberry Pi

Be sure that you have already installed necessary libraries into Raspberry Pi too.

python motor-run.py

Materials Used

Mechanical Parts

In the frame of the conveyor belt, I have chosen Sigma Profile for easy assembling.

  • 5 Meters 30x30 Sigma Profile Slot:8
  • 2 Meters 30x60 Sigma Profile Slot:8
  • 50 pieces Hidden Corner Bracket 30x30 Slot:8
  • 35 pieces T Slot Nut M8 30x30 Slot:8
  • 15 pieces T Slot Nut M6 30x30 Slot:8
  • 4 pieces 6203 Bearing
  • 2 Meters Belt

mechanical parts

Electrical Parts

  • Logitech C270 HD WebCam
  • DC-Motor
  • Gear Motor (1405 rpm, 0,18kW)
  • Raspberry Pi Model 3 A+
  • L298N DC Motor Driver

electrical  parts


Conclusion

This project showcases my skills in machine learning, mechanical engineering, and GUI design, and has the potential to make a positive impact in the food industry by helping to reduce food waste.


bachelor-thesis-project-ml-based-conveyor-belt-for-detecting-separating-rotten-fruits's People

Contributors

ierolsen 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.