Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

A 2 stage classification model in which it Classifies images in one of 7 fruits (Apple, Banana, Lemon, Mango, Orange, Pomegranate, and Strawberry), and also creates a score from 0-100 on how Fresh the fruit look

Notifications You must be signed in to change notification settings

Pana52/Pomona-App---Fresh-vs-Rotten-Fruits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

86 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fresh Fruits Project Overview

Welcome to the Fresh Fruits Project! This repository contains all the necessary assets, models, and code for a Unity-based fruit classification application. The project is divided into three main directories:

FreshFruits
FreshStaleFruits - rep
Pomona

Below are detailed instructions on how to use each directory and the code within. Directory Structure FreshFruits

Description: This directory contains all the Unity assets for the project.
Usage: Open this directory in Unity to access and work with the assets. The directory includes 3D models, textures, scripts, and other resources necessary for the Unity application.

FreshStaleFruits - rep

Description: This directory includes the code and models for fruit classification.

Structure:
    models: Contains the code for two different classification models.
        Fruit_FreshvsRotten.py: Used 7 times for Fresh vs Rotten classification for each fruit individually.
        VGG_training.py: Used for a 7-class classification.
    app.py: Runs a Flask backend server for the application, to receive images from the Unity application and send back the classification results.

Usage:
    Open this directory in your preferred IDE or code editor.
    Navigate to the models folder to view and run the classification models.
    Use app.py to start the Flask backend server:

    bash

    python app.py

    Ensure the Flask server is running to enable communication between the Unity application and the classification models.

Pomona

Description: This directory contains the build of the Unity application.
Usage: Use this directory to run the compiled Unity application. It includes all necessary files to launch and use the fruit classification application.

How to Run the Project

Set Up Unity:
    Open the FreshFruits directory in Unity.
    Ensure all assets are correctly imported and the scenes are properly set up.

Run the Flask Server:
    Navigate to the FreshStaleFruits - rep directory in your IDE.
    Start the Flask backend server by running app.py:

    bash

    python app.py

Launch the Unity Application:
    Open the Pomona directory and run the Unity build.
    Ensure the Flask server is running to allow the Unity application to send images for classification and receive results.

New Release

For the finished build of the Unity application included in the new release zip file, you do not need to run app.py independently. The application will automatically start the Flask server. This feature simplifies the setup process for end-users. Additional Information

Dependencies: Ensure all necessary Python libraries for running the classification models and Flask server are installed. You can install the required libraries using:

bash

pip install -r requirements.txt

Modifications: If you need to modify the classification models or the Unity assets, make the changes in their respective directories and ensure they are properly linked.

About

A 2 stage classification model in which it Classifies images in one of 7 fruits (Apple, Banana, Lemon, Mango, Orange, Pomegranate, and Strawberry), and also creates a score from 0-100 on how Fresh the fruit look

Resources

Stars

Watchers

Forks

Packages

No packages published