Inspiration : Agriculture is the backbone of our nation, but many farmers still rely on traditional knowledge to determine soil quality and crop selection. This often leads to poor yields and inefficient land use.

We were inspired to create AgroMind AI — a project that combines AI, data, and sustainability — to help farmers make scientific, data-driven decisions about what crops to grow, improving both productivity and environmental balance.

What it does : AgroMind AI is a hybrid web-based system that predicts soil type and recommends suitable crops.

It performs two key tasks:

Soil Classification: Uses CNN (MobileNetV2) to analyze uploaded soil images and classify them into categories such as red, black, clay, sandy, or loamy.

Crop Recommendation: Uses a Random Forest model trained on soil parameters (N, P, K, pH, temperature, and moisture) to recommend the best-suited crops.

The platform helps farmers and researchers understand soil properties and make sustainable agricultural choices.

How we built it: Frontend: HTML, CSS, JavaScript for the user interface.

Backend: Flask framework (Python) for connecting models and handling API routes.

Machine Learning: Random Forest model trained using a soil and crop dataset.

Deep Learning: MobileNetV2 CNN for image-based soil type classification.

Database: CSV datasets from Kaggle and custom-collected agricultural data.

Hybrid Integration: Combined predictions from both models to improve accuracy.

Challenges we ran into: Collecting diverse and balanced soil image datasets.

Training CNN models that generalize well to various soil textures.

Integrating two models (ML + DL) into a single Flask web app.

Handling latency and memory issues during image prediction.

Designing a simple, accessible interface for non-technical users.

Accomplishments that we're proud of: Successfully built a hybrid prediction system that combines ML and DL models.

Created a working web app that provides accurate results in seconds.

Achieved high accuracy in both soil classification and crop recommendation.

Demonstrated how AI can be applied to real-world problems in agriculture.

Built a team project that merges innovation and social good.

What we learned:How to preprocess both image and numerical data effectively for AI models.

Integration of Flask with Machine Learning and Deep Learning models for web deployment.

How to build a hybrid prediction system combining CNN and Random Forest.

The impact of AI in achieving Sustainable Development Goals (SDG 2 – Zero Hunger) by supporting sustainable agriculture.

How to manage a complete AI project lifecycle independently — from dataset preparation and model training to deployment and UI design.

What's next for AgroMind AI: Adding weather and satellite data for climate-based predictions.

Expanding the dataset to support more regional soil types and crops.

Developing a mobile version for farmers with limited internet access.

Partnering with agricultural organizations and NGOs to pilot in rural areas.

Integrating IoT sensors for real-time soil parameter monitoring.

Built With

  • and-backend-logic-flask-?-lightweight-web-framework-for-connecting-the-ml/dl-models-with-the-frontend-html
  • css
  • csvdataset
  • deep-learning
  • flask
  • flaskrestapi
  • github
  • html
  • javascript
  • javascript-?-for-designing-a-clean-and-responsive-user-interface-tensorflow-/-keras-?-for-building-and-training-the-cnn-(mobilenetv2)-model-scikit-learn-?-for-training-the-random-forest-model-for-crop-recommendation-pandas
  • jupyternotebook
  • keras
  • matplotlib
  • numpy
  • pandas
  • python
  • scikit-learn
  • tensorflow
  • vscode
Share this project:

Updates