Inspiration
Farmers are widely unappreciated for the impact they provide for our society. With grocery corners always around the corner and food at our fingertips it becomes easy to forget their importance. While in the United States we may not think of agriculture as a major concern, crops form the cornerstone of any society, a cornerstone that only becomes more important in smaller communities. However, despite their increased importance, it is these small farmers who have the least resources at hand and the most at stake when it comes to unforeseen drought and disease. Inspired by farmers across the globe supporting their local communities we built something to support them: Sprout, a smart, AI driven system with even smarter insights designed to predict and prevent events weeks before they happen.
What it does
Sprout helps farmers and governments detect disease outbreaks before symptoms appear using satellite imagery, soil data, and machine learning. Farmers begin by selecting the area of their farmland, coordinates, crop type, and start data. Using this information Sprout pulls real time data on soil moisture, precipitation, solar radiation, and other crucial metrics. Based on these parameters, our model develops an informative risk score that measures liabilities of crop growth. In the case of a high risk event, alerts are sent on the app or through SMS including information on preventative measures.
How we built it
Sprout is a web application built fundamentally using React and TypeScript. We employed Vite as the build tool for development time and production time speed and optimization. The app is structured with proper separation of features like a Dashboard, Map View, Alerts, and full Analysis page—all connected through an authentication system with security consideration. For the UI, we employed Shadcn/ui to create clean, reusable components and styled them all using Tailwind CSS, with a performance boost from tailwindcss-animate for smooth transitions. React Leaflet powers the interactive map views, and Recharts helps visualize key data trends and patterns. State management and API calls were handled with React Query, and React Router DOM for smooth client-side routing. For form management, we leveraged React Hook Form along with Zod for validation. For a clean development process, I installed ESLint, PostCSS, and TypeScript, and used Sonner to add real-time feedback using toast notifications across the application.
Sprout's backend is a Flask application that tries to deliver integrated crop disease risk prediction by consolidating different sources of data and advanced prediction models. It has at its core a data integration layer that draws in satellite imagery from the Google Earth Engine, climate from the NASA POWER API, and soil from SoilGrids v2.0. The model integration layer integrates several predictive models, including the UW-Madison model for weather-based prediction, the VDIFN model for temperature modeling, SARIMAX with SVC for time-series prediction, EfficientDet for satellite image analysis, Vision Transformer (ViT) for deep image processing, and BioMA for soil condition modeling. These models are input into a weighted ensemble engine, which generates risk scores for targeted fungal, bacterial, and viral disease via a grid-based spatial analysis system. The application exposes its service as RESTful APIs, which accept geographic coordinates as input and output granular, region-level disease risk assessment with support for targeted and large-scale grid analysis. The backend is modular and extensible, with good error handling and logging facilities and thus suitable for further development as well as production deployment.
Challenges we ran into
On the backend, we struggled mainly with integrating the complex data sources while prioritizing maintaining performance and reliability. The geospatial calculations had to be optimized carefully for large areas, and the use of multiple ML models added complexity to our stack. Front-end concerns included developing an intuitive map interface with live refresh, supporting cross-browser compatibility, and keeping responsive design that displayed correctly in both desktop and mobile browsers. We also had to include extensive error handling and user feedback mechanisms to provide a seamless experience through potential API breaks and network errors.
Accomplishments that we're proud of
The accomplishment we're most proud of is our robust data fetching and processing pipelines. We were able to successfully integrate multiple different complex data sources including GEE, NASA Power, and SoilGrids and compile it all into one singular risk assessment score for the user. Additionally, we have a nice architecture of multiple ML models set up including EfficientDet, Vision Transformer, and SARIMAX. Finally, we're proud of our overall geospatial analysis and how we developed our grid based spatial analysis system.
What we learned
Through this project, we gained rich experience in integrating machine learning models and processing geospatial data, as well as how to command mastering the integration of multiple complex APIs and data sources. We developed excellent error handling and debugging capabilities, learned further about RESTful API design, and improved at optimizing performance with large datasets. We also deepened our expertise in crop disease prediction and agri-data analysis, and refined our documentation and project management practices. We also gained knowledge on how to most effectively communicate a technical project, developing a finer appreciation for the nuance that goes into tailoring explanations, visualizations, and demonstrations to express both impact and technical elegance.
What's next for Sprout
Our next steps include collaborating with scientists and researchers to integrate more specific/advanced ML models, enhancing disease prediction accuracy with ensemble and transfer learning. We also plan on enhancing our user's experience by creating a mobile application and including interactive tutorials. We think offline features would be cool to implement which would feature map caching, and we want to enhance data sources to add real-time satellite updates and historical analysis. We also plan on designing a farmer forum-based community site and user reporting, verification system and implement serverless architecture for scalability as well as document APIs correctly. We will employ subscription tiers, usage analytics, and farm management system integration to provide maximum value to our users ultimately.
Built With
- css3
- flask
- googlecloudplatform
- googlecloudstorage
- googleearthengine
- html5
- javascript
- leaflet.js
- nasapower
- numpy
- sarimax+svc
- shapely
- tensorflow
- vit
Log in or sign up for Devpost to join the conversation.