Machine Learning

Krishak: AI-Powered Virtual Farming Assistant

PythonNLPPyTorchFastAPINext.jsScikit-learn

Krishak is an AI-powered virtual farming assistant designed to help farmers make informed agricultural decisions. The platform addresses challenges such as crop selection, plant disease identification, and limited access to reliable farming knowledge by combining machine learning, deep learning, and large language models into a single intelligent assistant.

Krishak: AI-Powered Virtual Farming Assistant screenshot 1

The system provides multiple AI-powered services, including voice-based question answering, paddy leaf disease detection, crop recommendation, and conversational farming support. Farmers can interact using either text or speech, making the application accessible to users with varying levels of digital literacy.

The conversational pipeline begins with OpenAI Whisper for speech-to-text conversion, after which user requests are routed to specialized AI models based on intent. Responses are generated through a fine-tuned language model, disease classification model, or recommendation engine before being returned as text or synthesized speech.

For agricultural question answering, a GPT-2 model was fine-tuned using LoRA on a custom dataset containing more than 5,500 farming-related question-answer pairs. This enables context-aware responses to common agricultural queries while significantly reducing the computational cost of fine-tuning.

A custom convolutional neural network (CNN) was developed for paddy leaf disease classification using the Paddy Doctor dataset. The architecture consists of four convolutional layers followed by fully connected layers, allowing the model to classify images into ten disease categories with an accuracy of 88.51%, precision of 89.69%, and recall of 86.94%.

Crop recommendation is powered by a Random Forest classifier trained on soil nutrients and environmental conditions, including nitrogen, phosphorus, potassium, temperature, humidity, and rainfall. The model achieved 99% classification accuracy and an F1-score of 0.98, enabling highly reliable recommendations for suitable crops.

Krishak was designed with future scalability in mind. Planned enhancements include extending disease detection to additional crops, introducing multilingual support, optimizing models for edge devices, integrating irrigation scheduling, and expanding the recommendation engine with climate-aware and NLP-driven decision support.