Inspiration

We initially wanted to do something with machine learning and facial recognition, but found it was a relatively saturated field and decided to train an entirely new AI. We wanted to create something that wasn't immediately abusable and had real world application, and eventually honed in on detecting signs of decay or rotting in fruit, specifically oranges. We decided to take on the Cipher Tech Challenge regarding image detection, and challenging it was!

What it does

The program will scan a window on your computer, and as you navigate said window it will scan for minor and major flags of rotten oranges, such as mold, texture, et cetera.

How we built it

We implemented OpenCV's Haar cascade training and sampling in order to create a relatively simple AI that looks for these patterns and draws a green box around them. It was done primarily in Python,

Challenges we ran into

Getting anything to work was an extremely uphill battle, and a majority of our time was spent researching, debugging, and unit testing in order to figure out what was going wrong. A major issue we encountered was implementing the library in Visual Studio Code, and we ended up having to import many functions from older versions of OpenCV. Another huge issue we had was the lack of good positive data regarding rotten oranges, as a dataset of only 100 images will flag regular oranges, even when trained against fresh fruit. There are thousands of little errors we made that I won't bore you with, but we managed to smooth almost everything out.

Accomplishments that we're proud of

As three first time hackathon attendees and college sophomores, we had no idea what was even expected of us when we arrived. For the first few hours we stumbled and learned and asked questions, and even though the challenges we decided to take on seemed genuinely unsolvable and insurmountable as relatively novice programmers, we still managed to adapt. Our team had constant, effective communication, and even though the AI is still relatively untrained, we managed to create something that can have a lot of potential given the right data.

What we learned

We learned a ton about libraries, packages, implementation in various languages, machine learning, and teamwork. Since none of us had ever written or done anything with either OpenCV or machine learning, it was a true uphill battle and we had to teach ourselves at a very fast pace.

What's next for Orange Detection via Machine Learning

In the future, gathering and uploading more positive samples would improve the AI tremendously, as we only trained it around 23 effective positive samples, which is miniscule. In a professional setting in collaboration with farmers, this data gathering would be much easier, but due to the limited nature of the scope we did what we could.

Built With

Share this project:

Updates