We believe that all plants deserve to live a healthy life.
Because healthy plants = healthy food, and healthy food = healthy humans.
In an age where there are more humans living on the earth than ever in history, producing food both sustainably and efficiently remains a challenge.
Crop damage is one of the leading issues in farming today.
It is estimated that roughly 10-15% of plants produced annually in the United States (even higher in developing countries) don't survive due to plan damage. This means that over half a billion tons of food is wasted before the consumer even gets to touch it.
Crops can be damaged by a number of vices: insects, fungi, diseases, wild animals, fires, over-hydration, dehydration, bacteria, and other pests.
Like fires, Crop damage spreads throughout a farm, so it is important that damage is reported quickly, because usually when the disturbance is realized, the damage has already been done. Modern farms have less humans monitoring the fields as compared to 20 years ago, and therefore, it is the norm for large areas of land to go unmonitored for weeks or even months.
Plant and crop damage is also common with hobbyist growers, who may not be as educated about planting methods as large-scale farming operations.
One of the most basic ways we can tell if a plant has been damaged is by looking at its leaves, and it's color (for certain fruits and vegetables).
Therefore, we decided to create a web-app that can do perform this early detection of plant damage and display the data in a graphical manner. Our system tracks the the plant or tomato health using a ML model trained and deployed on AWS Sagemaker, and feeds this information back into the webapp, so that farmers as well as hobbyist growers are able to see if there is a overall decline in the health of their plants and take the measures necessary to keep their garden or farms alive.
What it does
Our project allows large companies as well as ordinary people, like you and me, to be able to farm correctly and efficiently. It provides you with data on your plant so that you are aware of how healthy the plant is, as well as gives the user an interactive graph to monitor the wellness of their plants. It is our hope that using this Data, farmers and hobbyist growers can make better decisions and spend less time taking manual samples and more time maximizing production, because at the end of the day, that's the #1 goal. By improving the effciency of our food through facilitating data-driven decisions, we are paving the road towards a better, more sustainable, and more healthy future.
How I built it
Throughout this project, we used various technologies varying from backend technologies to front-end technologies, APIs, Machine Learning models, and much more!
The model was trained on AWS Sagemaker Studio with a medium sized (1k images) dataset and 4 convolutional layers, with no fully connected layers except for the output layer. This model was tested and then uploaded to a sagemaker endpoint running on ml.m4.xlarge. We then did some addiitonal testing on this endpoint through a jupyter notebook running on an EC2 instance. After this, we were able to create an API through AWS API gateway, connect it to a lambda function which invoked the endpoint using Boto3, sagemaker's python SDK, and send the result back to the client.
Challenges I ran into
Front-end: We ran into many challenges integrating the chart API. We had many issues getting data from the firestore real-time database and presenting it on a nice looking chart. Many of the articles related to this topic did not fit our needs or were outdated. However, luckily, we were able to figure out this issue on our own and resolve it.
Back-End: Training the model with our initial dataset through Sagemaker Studio was the easiest part of this entire project. Connecting this endpoint to AWS Lambda was the most challenging part of this process, as Lambda is usually used for much lighter weight applications. We had to manually import OpenCV as well as other dependencies to Lambda as Lambda layers, which required the use of an Ubuntu Instance through EC2, sending this result to S3, and creating the layers. After this, we ran into multiple issues with the JSON formatting and HTTP formatting (for the return), which was hard to diagnose as every error on the Lambda side resulted in "Internal server error 502", which meant that we had to view CloudWatch Logs for each update/post. Eventually, we were able to parse the correct form.
Accomplishments that I'm proud of
Backend: Our API Works!
Front-end: Were finally able to get the plant page up and running and displaying data perfectly.
What I learned
Backend: I extended my knowledge about AWS in general, and have learned to appreciate the connectivity of all of its services.
What's next for GrowIt
We seriously plan on publishing GrowIt to the public so that no one, after today, is not able to contribute to our lovely planet.
We also plan on implementing reinforcement training using user images to make better predictions.