-
Correlation matrix of all the variables involved.
-
Pair plot of all the crops used in the sample.
-
Crop yield projection: single
-
Crop yield projection: comparison
-
Nitrogen value prediction: single
-
Nitrogen value prediction: comparison
-
Nitrogen value prediction plot comparison
-
Nitrogen value prediction results
-
Resources page
-
Frequently asked questions page
-
Sneak-peak of Next.js app under development.
Inspiration
Our inspiration for FarmX stems from the pressing need to address challenges faced by farmers in managing soil health and subsequently optimizing fertilizer use. We have recognized the information gap and lack of personalized guidance for farmers. Michigan, being a primarily agricultural state faces this problem to a higher degree, and we aim to empower them with a solution that leverages technology to revolutionize agricultural practices. Another issue this project contributes to is climate change - by reducing the detrimental impact of fertilizer overuse on the climate, FarmX is making the world cleaner, one crop at a time.
Michigan Farmers struggling with fertilizer usage
What it does
Predicting Optimal Nitrogen Value
Taking independent variables like temperature, humidity, pH, and rainfall, and using data classification methods and Machine Learning to predict the optimal Nitrogen value (in the fertilizer) that needs to be added to the soil. Farmers can then use this information to reap the full benefit of fertilizers while minimizing the drawbacks. This app also aims to support first-time farmers. Fertilizers can be expensive for non-commercial farms. Thus, the best possible crop for a location can be predicted by our model.
Finding Crop Yield
We can identify the yield of the crop by taking dependent variables like crop weight, crop moisture, crop type, and harvested area. This would work especially well in the pre-sowing stage where farmers can identify which crops can yield the most in a limited harvesting area.
Resources/Information
Another feature of our application is the resources page, which provides links for farmers to access. The links help the farmers access tests and information regarding soil health, fertilizer health and the US Department of Agriculture.
How we built it
Backend:
- Utilized multiple datasets containing NPK values of crops, along with temperature, humidity, pH, and rainfall values.
- Created our dataset containing crop moisture and weight of the crop.
- Imported modules like Pandas, NumPy, Matplotlib, and Seaborn.
- Created multiple scatterplots and correlation matrices to visualize the Actual vs. Predicted Regression to support our models.
- Built a modified ML algorithm that uses Random Forrest.
- Used pickle to dump the trained models generated using Random Forrest to cache the models in Streamlit, ensuring the model runs faster than when pickle wasn't used.
Frontend:
- Started with Python and KivyMD. Switched to Streamlit to take advantage of the environment for ML and AI.
- Created app.py for Streamlit deployment where we dedicated a page for every unique function of the app.
- Upon completion, commenced work on Next.js / React-based web app for future builds and a stronger ML algorithm.
- Comparison framework to compare yield/better crop to grow for given conditions.
Challenges we ran into
- Data Variability: Dealing with the diverse nature of soil data and farming practices posed challenges in creating a robust algorithm.
- Integrating our front-end and back-end
- Importing relevant modules
- Attaining a high accuracy on our concentration predictor -Miscellaneous bugs
Accomplishments that we're proud of
- Climate Change Mitigation: We aimed to amplify efforts to curb global warming. According to an article by MSU Today, fertilizers contribute greenhouse gases to the atmosphere, and excess usage of these fertilizers makes the effects even worse. By providing a data-driven approach to predicting the ideal amount of fertilizer, or the ideal crop that can be grown with negligible fertilizer, we offer the agriculture sector to contribute towards sustainability. Moreover, excess usage of NPK damages the topsoil, a practice that is not sustainable.
- DEI Applications: Farmers in the United States are overwhelmingly white males. Some sources say close to 95% of agro-based workers fit in the above demographic. Ease of access is important in this field, and this application offers other demographics, particularly women and racial minorities, to get involved in the agriculture sector. Farming is usually considered taboo in many places, although, it is a pretty lucrative business. This app can guide and offer them resources (possibly more after expansion).
- Community Applications: Food security affects our communities worldwide. Farmers in Michigan are affected by excess fertilizer usage. We are giving back to the community of farmers here in Michigan.
- Learning New Technologies: Summarized below :) We made a pretty sweet hack in 24 hours with minimal experience. We're proud of that!
What we learned
In 24 hours, we successfully learned and implemented:
- kivy module
- data classification
- Machine Learning
- Github repositories
- modules like pandas, matplotlib, mediapipe, numpy
- Next.js
- Streamlit
What's next for FarmX:
- Evaluating more datasets to predict the value of phosphorous and potassium along with nitrogen, which we couldn't complete within 24 hours.
- Adding geographical data to the model to take into consideration soil types.
- Hardware accessories like sensors and Arduinos to complement our project and make it accessible for farmers. It can detect soil content in real time, and that will be helpful.
- Adding a login system where users can save and edit their data.
- Enabling a data collection system to improve our model.
- Live up to our name: make this the all-round platform for farmers who are just getting started and people looking for a potentially profitable hobby!
References
Built With
- html
- javascript
- kivy
- machine-learning
- material-ui
- matplotlib
- next.js
- numpy
- pandas
- pickle
- python
- randomforestclassifier
- sklearn
- streamlit
Log in or sign up for Devpost to join the conversation.