Inspiration

Diseases destroy huge amounts of crops every year in Ghana. This has a crippling impact not only on the economical development of Ghana as a whole, but especially on the farming families and communities. In modern agriculture most diseases are dealt with by using pesticides and machinery, this requires high cost investments and the danger of environmental damage even when used correctly are high to non-avoidable. Therefore we wanted to offer the many farmers a solution which they can implement directly by using their hands and their smartphones.

What it does

Using Computer Vision we can detect crop diseases. After detection our App guides the farmers on their next steps, to tackle these diseases.

How we built it

We decided on the tomato challenge in the beginning as the data set looked very good, where we started with a pretrained ResNet and got some good first results after only a few hours. After having a functioning workflow we searched for models with a good ratio of performance vs inference time and parameters. We did that by looking through benchmarks of ImageNet where we focused on models with low parameter count and gigaflops of processing needed in inference.

We found a good solution in the EfficientNet family. We used models in that family pretrained on ImageNet and continuously picked smaller models with the intention to stop once validation accuracy decreases rapidly. To our surprise even the smallest model in the family still had validation accuracy over 97%.

Afterwards we also decreased height and width continuously, while that doesn’t change the parameter count, inference time decreases a lot from smaller input sizes. We settled for setting it to 128x128 pixels.

At this point we still had much time left so we decided to also tackle the cocoa challenge. By looking for more datasets, we found a good one that focuses heavily on black pod rot and healthy cocoa samples. After verifying that this is by far the most devastating disease for cocoa production we repeated the approach we used for the tomato dataset and settled on the same architecture but with a different head.

Challenges we ran into

Since we did not want to rely on the local Internet infrastructure we had to build offline models for the disease detection. Implementing this local model into the back-end of our App proved to be very challenging. Furthermore our limited experience in App development limited us to focus more on the back-end of our App.

Accomplishments that we're proud of

Developing a relativley small model that can run locally on a device and implementing that in the back-end of our App was more than we even hoped to accomplish. Especially being able to tackle Tomato and Cocoa diseases was very rewarding.

Coming up with a cool idea and making it real regardless of an absence of an app development experience before. Most importantly, enjoying the competition while all of us participated in it.

What we learned

From this challenge we definetly learned the step from building and training a model to implementing it in an application.

What's next for Hackstreet Boys

Since we focused more on the Back-end of our App the next steps for us is to develop an intuitiv front-end. Furthermore we would like to be able to detect diseases in even more crops and support the farmers even more.

Share this project:

Updates