Inspiration
Plants are a big part of Earth’s ecosystem. They are what provide us with food, oxygen, and shelter. However, these plants can easily be infected by many diseases. Due to the increasing air pollution, it is very common for many garden plants to be exposed to toxins such as nitrogen dioxide, sulfur dioxide, and more. This leads to poor living environments and a decrease in production. Furthermore, a plant’s survival depends on the care it is getting. When diseased, pruning and trimming diseased parts are important before the disease spreads. Luckily, my project classifies diseased plants to increase awareness, discover harmful trends, and improve life for your plants.
What it does
Smart Greens requests for a picture of a branch, leaf, or part of the plant, to see the patterns and identify if there are any diseases. Each pixel and frame in the plant is analyzed and assigned a score of 0 or 1, representing “healthy” or “diseased”. Furthermore, it gives a confidence score from 50% - 100%. Users can also keep track of their plants daily by logging the results of the predictions, and some comments about the plant such as the area, water, and sunlight.
How we built it
The ML model was created through a convolutional neural network using Python, TensorFlow, and Keras. It was trained on 4,500+ images and utilized transfer learning to incorporate the Adam optimizer and the MobileNetV2 architecture. MobileNetV2 consists of inverted bottleneck residual blocks and lightweight convolutional layers, allowing for my ML model to be memory efficient and fast, and compatible with mobile devices. Here is a research paper on MobileNetV2: https://arxiv.org/abs/1801.04381. Also, Scikit-learn and MatPlotLib were used to analyze the training model with the highest accuracy using the validation dataset. Streamlit and Flask-Ngrok were used to create a web application for users to access the deep model. Images were pre-processed and converted into a NumPy array using OpenCV and then passed into the deep learning model to provide a prediction and confidence rate.
Challenges we ran into
The neural network consists of 2.9M+ parameters, resulting in the training of the ML model being very long and tedious. Each model took 5+ hours to train. Even worse, I had to train it multiple times to find the best accuracy and results. I was able to train 4 different ML models in the short time that I had and even had to run it overnight. I also had trouble with deploying my web application on Flask-Ngrok, which required the process of getting a private key to connect to their tunnels. Also, I originally was creating the frontend using ReactJS and Flask but had to, unfortunately, switch to different frameworks because I was using Google Colab to create the ML model, which is very different to create websites.
Accomplishments that we're proud of
I am very proud of creating Smart Greens in the limited time that everyone had. I am happy that I completed my project and created an intuitive website that was deployed on the internet using Flask-Ngrok. I believe that this ML model has a lot of use cases for everyday people who want to detect diseases to farmers who want to maintain their crops.
What we learned
I learned so much about neural networks and how to incorporate different techniques such as applying different layers, architectures, and transfer learning to develop this algorithm. I learned more about how to use Streamlit and increase the accuracy of my algorithm. Furthermore, I learned more about ReactJS and how to connect it with Flask.
What's next for Smart Greens
The next step for Smart Greens is to create a better website with more features such as a login page. Furthermore, I am hoping to use my ML model for computer vision to allow users to use their cameras in real-time to create a prediction rather than taking a picture and uploading it to my website.


Log in or sign up for Devpost to join the conversation.