A comprehensive web application for soil analysis, crop health monitoring, and agricultural recommendations using machine learning and remote sensing data.
-
Soil Analysis
- Detailed soil composition analysis
- Nutrient level assessment
- pH and CEC analysis
- Texture classification
-
Crop Health Monitoring
- Vegetation indices (NDVI, EVI, SAVI, ARVI)
- Time-series analysis
- Health status visualization
-
ML-Powered Recommendations
- Soil condition predictions
- Crop recommendations
- GPT-2 based detailed insights
- Custom-trained models
- FastAPI (Python web framework)
- SQLite (Database)
- Machine Learning Models (scikit-learn)
- GPT-2 for soil analysis insights
- JWT Authentication
- Svelte + Vite
- Chart.js for data visualization
- Modern responsive UI
- Python 3.8+
- Node.js 14+
- npm
- Clone the repository and install Python dependencies:
pip install -r requirements.txt- Generate RSA keys for secure authentication:
openssl genpkey -algorithm RSA -out private.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -pubout -in private.pem -out public.pem
openssl rsa -in private.pem -traditional -out private.pem- Start the backend server:
cd backend
uvicorn main:app --reload- Install and run the frontend:
cd frontend
npm install
npm run devOnce the backend is running, visit http://localhost:8000/docs for the interactive API documentation.
Key endpoints:
/soil-composition/*- Soil analysis endpoints/predict- ML model predictions/crop-health/*- Crop health monitoring
The application uses JWT-based authentication with RSA encryption for password security. All API endpoints (except login/signup) require authentication.
- Soil classification model (RandomForest)
- Fine-tuned GPT-2 model for detailed soil analysis
- Custom models for crop yield prediction
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Jan Kozeluh - [email protected]
- ISRIC World Soil Database
- OpenAI GPT-2
- Remote sensing data providers