Skip to content

davidauza-engineer/fruit-condition-application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fruit Condition Application

📗 Table of Contents

📖 Fruit Condition Application

This project is made in the context of the Wearable Devices and Computer Vision course at Harvard.

Fruit Condition Application is a CLI application that detect fruits in an image, generates a Color Palette and determines the condition of the fruit based on the detected colors. The supported fruits in the current version are: apples, bananas, and oranges.

🛠 Built With

Tech Stack

Python 3.8.15 and other computer vision and machine learning libraries like extcolors, imageai, Keras, opencv, tensorflow, between others. Consult requirements.txt for a complete list of dependencies.

Key Features

The application determines the condition of a fruit based on the features below:

  • Object detection.
  • Color palette generation.
  • Determining the condition of a given banana, apple, or orange.

(back to top)

💻 Getting Started

Below you can find detailed instructions of how to run this project.

To get a local copy up and running, follow these steps.

Prerequisites

In order to run this project you need:

  • Python 3.8.15

Setup

Clone this repository to your desired directory.

Install

Install this project dependencies by going to the project's root directory and running:

$ pip install -r requirements.txt

Usage

To run the project, execute the following command:

$ python main.py

When prompted to input the image path you can use the path for the images in the test directory. For example: /Users/davidauza/Desktop/fruit-condition-application/test/banana.jpg. The supported image formats are: png, jpg, jpeg, tiff, bmp, gif. Also, make sure to include a valid path with no spaces in the image name.

If there is a fruit in the image the color palette for that fruit will be printed and the fruit condition will be determined.

Runing demo

First, downlowd all the files as well as the notebook into a folder or location together. Since this is a jupyter notebook, it can best be run from the termial/command prompt. If one does not have jupyter notebooks installed, they can use google's online notebook service through their google account, another IDE that is jupyter notebook compatible (ex: canopy), or by installing jupyter notebooks. The latter is the easiest and can be done through the command prompt by entering the following:

$ pip install notebook

Once installed, either open up jupyter notebooks through the terminal by entering

$ jupyter notebook

and navigating to the where "LearningTones.ipynb" is located on your disk or cd to the location where "LearningTones.ipynb" is and entering

$ jupyter notebook demo.ipynb

in the command prompt. Jupyter notebooks will open on a web browser page, but no fear, it does not require the internet-- it uses a port on the local host (your computer) to run on the browser page.

If desired, change the model and image paths and check all element names match the following to the format testing_models(img_path, img_class_model, pix_class_model). When ready, click the double arrow to "Run All Cells".

(back to top)

👥 Authors

This project was created by the Harvard students below.

👤 David Auza

👤 Amna Jawad

👤 Bridgette Maurer

👤 Jody Trumbull

(back to top)

🔭 Future Features

After releasing the MVP the features below will be implemented.

  • Background removal for the cropped fruit images.
  • Cropping the object to just generate the color palette for the very specific fruit.
  • Support for spaces in the image path.

(back to top)

📝 Resources

(back to top)

About

Computer vision app to determine fruit condition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published