This project is made in the context of the
Wearable Devices and Computer Vision
course atHarvard
.
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
.
Python 3.8.15 and other computer vision and machine learning libraries like
extcolors
,imageai
,Keras
,opencv
,tensorflow
, between others. Consultrequirements.txt
for a complete list of dependencies.
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.
Below you can find detailed instructions of how to run this project.
To get a local copy up and running, follow these steps.
In order to run this project you need:
- Python 3.8.15
Clone this repository to your desired directory.
Install this project dependencies by going to the project's root directory and running:
$ pip install -r requirements.txt
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.
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".
This project was created by the Harvard students below.
👤 David Auza
- GitHub: @davidauza-engineer
- Twitter: @davidauzaeng
- LinkedIn: David Auza
👤 Amna Jawad
- GitHub: @Amnajawad
- LinkedIn: Amna Jawad
👤 Bridgette Maurer
- GitHub: @bmaurer2
- LinkedIn: Bridgette Maurer
👤 Jody Trumbull
- GitHub: @JoTeaHESFolio
- LinkedIn: Jody Elizabeth Trumbull
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.