Welcome to RV_Diagnoze, an AI-powered web application designed to empower farmers, agronomists, and researchers in their quest to maintain healthy rice crops. With advanced image-based disease classification, intuitive UI, and responsive design, RV_Diagnoze is your ultimate companion in ensuring the well-being of your rice fields. Dive into the world of precision agriculture with this innovative tool that makes crop health management both effective and effortless.
In the world of agriculture, time is of the essence. Diseases can spread rapidly, devastating crops and leading to significant losses. RV_Diagnoze offers a quick, reliable solution to identify and manage rice crop diseases, leveraging cutting-edge AI technology to deliver accurate diagnoses and actionable insights right at your fingertips.
- State-of-the-Art Deep Learning Model: Our application employs a finely-tuned Convolutional Neural Network (CNN) model, meticulously trained on a robust dataset of rice leaf images to ensure accurate and reliable disease classification.
- 10 Disease Categories: RV_Diagnoze can accurately classify images into one of the following categories:
- Bacterial Leaf Blight
- Brown Spot
- Healthy
- Leaf Blast
- Leaf Scald
- Narrow Brown Spot
- Neck Blast
- Rice Hispa
- Sheath Blight
- Tungro
- Custom Remedy Suggestions: For each identified disease, the tool provides specific, actionable remedies to manage and mitigate the issue.
- Fertilizer Recommendations: Get tailored advice on the best fertilizers to strengthen your plants against diseases.
- Pesticide Options: Access recommendations on effective pesticides to combat pests and diseases, ensuring your crops stay healthy.
- Dynamic and Intuitive Interface: Designed with a user-first approach, the UI adapts seamlessly to different devices, offering a smooth and engaging experience whether on desktop or mobile.
- Enhanced Animations: Delight in a visually appealing interface with smooth animations that make user interaction both intuitive and enjoyable.
- Detailed Prediction Logs: Each diagnosis is logged with essential details like timestamp, filename, predicted label, and confidence score, providing a thorough record of your crop health management. The logs are stored in an SQLite database, ensuring secure and reliable storage.
- Database Support: The logs are managed through an SQLite database, making it easy to track and analyze your cropβs health over time.
- Diagnosis Report Sharing: After receiving a diagnosis, RV_Diagnoze can send the details of the diagnosis when "Send Details via Whatsapp" button is clicked, including remedies and recommendations, to the phone number associated with your account via WhatsApp. This ensures that you have quick access to the information, even when you're on the go.
Ready to get started? Follow these steps to set up RV_Diagnoze on your local machine:
Start by cloning the RV_Diagnoze repository:
git clone https://github.com/yourusername/RV_Diagnoze.git
cd RV_DiagnozeDownload the Rice Disease Varieties Dataset and place it inside the dataset/ directory within the RV_Diagnoze folder. This ensures that all the necessary data is readily accessible for the application.
Your directory structure should now include:
RV_Diagnoze/
βββ dataset/
β βββ Bacterial_Leaf_Blight/
β βββ Brown_Spot/
β βββ Healthy/
β βββ ...
Ensure Python is installed on your system. Then, install the required Python packages by running:
pip install -r requirements.txtBefore using the application, you need to train the model. Open the Model_Training.ipynb Jupyter Notebook and follow the instructions to train the model using the dataset. Once the training is complete, the trained model will be saved as model.h5 in the RV_Diagnoze/ directory.
Note: The application will not function until the model is trained and the model.h5 file is generated.
You will need to download videos related to each rice disease. These videos can be sourced from platforms like YouTube or other educational resources, based on your preferences. Once downloaded, the videos should be placed in the static/videos/ directory within the RV_Diagnoze/ folder. Ensure that each video is named according to the corresponding disease as listed below:
bacterial_leaf_blight.mp4- Video for Bacterial Leaf Blightbrown_spot.mp4- Video for Brown Spothealthy.mp4- Video for Healthy leavesleaf_blast.mp4- Video for Leaf Blastleaf_scald.mp4- Video for Leaf Scaldnarrow_brown_spot.mp4- Video for Narrow Brown Spotneck_blast.mp4- Video for Neck Blastrice_hispa.mp4- Video for Rice Hispasheath_blight.mp4- Video for Sheath Blighttungro.mp4- Video for Tungro
This ensures that the correct video is played for each diagnosis.
After the model is trained and videos are placed correctly, launch the application by executing:
python app.pyVisit http://127.0.0.1:8080/ in your browser to start using the tool.
Note: The trained model and video files will be stored in the RV_Diagnoze/ directory, making it easy to manage and deploy along with the application.
The model at the heart of RV_Diagnoze was trained on a carefully curated dataset of rice leaf images, which you can access on Kaggle. This dataset includes thousands of images from various rice fields, meticulously labeled by agricultural experts to ensure high accuracy.
- Convolutional Neural Network (CNN): The model is built on a CNN architecture, featuring multiple layers of convolutional filters, pooling, and fully connected layers. This architecture was fine-tuned to achieve the highest possible accuracy in classifying rice leaf diseases.
- Preprocessing: Images are preprocessed by resizing to a consistent size, normalizing pixel values, and augmenting the dataset to enhance the model's generalization capabilities.
- The model was trained using the TensorFlow framework, with extensive hyperparameter tuning performed to optimize performance. Training was carried out on a GPU to expedite the process and improve model efficiency.
- The modelβs effectiveness was evaluated using metrics such as accuracy, precision, recall, and F1-score, ensuring it meets the demands of real-world agricultural applications.
Hereβs an overview of the directory structure for the RV_Diagnoze project:
RV_Diagnoze/
βββ app.py # Main Flask application and route definitions
βββ Model_Training.ipynb # Jupyter Notebook for training the CNN model
βββ requirements.txt # List of dependencies required for the project
βββ static/ # Static assets such as CSS, images, and videos
β βββ css/ # Stylesheets for the application
β βββ uploads/ # Directory where uploaded images are stored
β βββ videos/ # Video files related to each disease
β βββ bacterial_leaf_blight.mp4 # Video for Bacterial Leaf Blight
β βββ brown_spot.mp4 # Video for Brown Spot
β βββ healthy.mp4 # Video for Healthy leaves
β βββ leaf_blast.mp4 # Video for Leaf Blast
β βββ leaf_scald.mp4 # Video for Leaf Scald
β βββ narrow_brown_spot.mp4 # Video for Narrow Brown Spot
β βββ neck_blast.mp4 # Video for Neck Blast
β βββ rice_hispa.mp4 # Video for Rice Hispa
β βββ sheath_blight.mp4 # Video for Sheath Blight
β βββ tungro.mp4 # Video for Tungro
βββ templates/ # HTML templates for rendering the web pages
β βββ index.html # Main page with file upload and result display
β βββ login.html # Login page for user authentication
β βββ signup.html # Signup page for new users
β βββ get_started.html # Landing page introducing the tool
β βββ disease_templates/ # HTML files for each disease (e.g., bacterial_leaf_blight.html)
βββ flask_app.db # SQLite database for storing user and prediction logs
βββ dataset/ # Directory to store the rice disease dataset
β βββ Bacterial_Leaf_Blight/ # Subdirectory for Bacterial Leaf Blight images
β βββ Brown_Spot/ # Subdirectory for Brown Spot images
β βββ Healthy/ # Subdirectory for Healthy images
β βββ Leaf_Blast/ # Subdirectory for Leaf Blast images
β βββ Leaf_Scald/ # Subdirectory for Leaf Scald images
β βββ Narrow_Brown_Spot/ # Subdirectory for Narrow Brown Spot images
β βββ Neck_Blast/ # Subdirectory for Neck Blast images
β βββ Rice_Hispa/ # Subdirectory for Rice Hispa images
β βββ Sheath_Blight/ # Subdirectory for Sheath Blight images
β βββ Tungro/ # Subdirectory for Tungro images
βββ model.h5 # Trained model file for classification
βββ README.md # This file - documentation for the project
Once you have the RV_Diagnoze application up and running, hereβs how you and others can use the tool:
Open your browser and navigate to http://127.0.0.1:8080/ (or the appropriate IP address/hostname if deployed on a server). You will be greeted with the homepage where you can get started.
- New Users: Click on the Sign Up button to create a new account. Fill in your details and click Submit. Once your account is created, youβll be redirected to the login page.
- Returning Users: Enter your credentials on the Login page to access the main features of RV_Diagnoze.
- After logging in, youβll be directed to the main page where you can upload an image of a rice leaf. Click the Choose File button, select your image, and click Detect.
- The tool will process the image and provide a diagnosis, displaying the identified disease (if any), along with tailored remedies, fertilizer recommendations, and pesticide options.
- For more details on the diagnosis, click on the Know More button. This will provide a deeper dive into the identified disease, including additional resources and information.
- The diagnosis results will be automatically sent to the phone number associated with your account via WhatsApp when the "Send Results via WhatsApp" button is clicked. This ensures that you have quick access to the information even when you're away from your computer.
- Use the navigation menu to explore detailed information about specific diseases. Each disease has a dedicated page with a description, remedies, fertilizer, and pesticide recommendations, as well as related videos.
- Hero Section: Greeted by a captivating hero section that introduces the tool with a welcoming message and a 'Learn More' button, which smoothly scrolls to the 'About Our Tool' section.
- Navigation Bar: A sticky navigation bar that remains visible as you scroll, ensuring easy access to different sections. For mobile views, the navbar transitions to a hamburger menu, maintaining usability across all devices.
- Information-Rich Sections: Detailed content is spread across 14 to 15 sections, providing in-depth information about the tool, disease descriptions, remedies, and more.
- Scroll-Triggered Animations: Engaging animations that activate as you scroll, adding a dynamic touch to the user experience.
We believe in the power of community and collaboration. If you have ideas for improving RV_Diagnoze or wish to contribute new features, feel free to fork the repository, make your changes, and submit a pull request. We welcome contributions that help make this tool better for everyone.
- Contributors: A special thank you to everyone who contributed to the development of this tool, from ideation to deployment.
- Dataset Providers: Our gratitude goes out to the creators of the Rice Disease Varieties Dataset on Kaggle, whose work made this project possible.
For any inquiries, feedback, or support, please reach out to Jerophin D R at [jerophinstanley47@gmail.com]. We look forward to hearing from you and working together to improve RV_Diagnoze!