Inspiration

Rice is both a staple food and an emerging crop in terms of global demand and sustainability challenges. It feeds billions of people daily, yet farmers face increasing uncertainty due to pest outbreaks, climate variability, and inefficient resource use. The importance of rice in food security makes it critical to develop decision-grade intelligence tools that can help stabilize yields and reduce risks. From a business logic perspective, even small improvements in yield prediction or pest risk management can translate into significant economic gains for farmers, cooperatives, and supply chains. Crop Sentinel AI was inspired by this dual need: to safeguard a staple crop that underpins global nutrition, while also creating scalable, data-driven solutions that deliver measurable business impact.

What it does

Crop Sentinel AI combines two predictive pipelines in a single interactive app. The first pipeline is a classification model that forecasts pest risk levels (Low, Medium, High) with confidence scores. The second pipeline is a regression model that predicts rice yield based on input efficiency, NPK levels, pest pressure, and growth stage thresholds. Together, these models provide decision-grade insights for farmers, enabling smarter, timely decisions.

How we built it

We used the Hex platform to design and publish an interactive app with modular tabs. Data preprocessing was handled with Pandas and Scikit-learn, including scaling and encoding via ColumnTransformer. We implemented RandomForestClassifier for pest risk prediction and RandomForestRegressor for yield forecasting, both wrapped in reproducible pipelines. Evaluation included accuracy, precision, recall, F1, ROC AUC, and confusion matrix for classification, and MSE, MAE, RMSE, R², and cross-validation for regression. The app was structured to be judge-friendly, with clear separation of tasks and transparent performance metrics.

Challenges we ran into

One challenge was designing a biologically plausible synthetic yield formula that balanced multiple agronomic parameters while introducing realistic variability. Another was ensuring categorical encoding and stratified splits were correctly applied to avoid data leakage. We also had to carefully structure the app so that judges could easily navigate between models and understand the outputs without confusion.

Accomplishments that we're proud of

We successfully built a dual-pipeline system that runs error-free in Hex and achieved near-perfect evaluation metrics. The app is modular, reproducible, and judge-friendly, with clear separation of pest risk and yield forecasting. We are proud of the clarity, robustness, and scalability of our solution, and the fact that it demonstrates how AI/ML can be applied to agriculture in a practical, impactful way.

What we learned

We learned how to design synthetic targets that simulate real-world agricultural variability, how to structure ML pipelines for reproducibility, and how to present technical models in a way that is accessible to non-technical audiences. We also gained experience in balancing technical rigor with storytelling for hackathon submissions, ensuring that our solution is both technically sound and compelling to judges.

What's next for Crop Sentinel AI

The next step is to integrate real-world agricultural datasets to validate the models beyond synthetic data. We plan to add explainability features such as feature importance plots and recommendation logic (e.g., irrigation or pesticide adjustments). Long-term, Crop Sentinel AI can be extended to other crops and geographies, becoming a scalable platform for responsible, data-driven agriculture that supports global food security and farmer livelihoods.

Share this project:

Updates