Code Monkey home page Code Monkey logo

paddyml's Introduction

Crop Guard - Deep Learning Model Using CNN and ResNet50

Overview

This project implements a deep learning model using Convolutional Neural Networks (CNN) and ResNet50 architecture to classify different diseases in rice crops. The model is trained on a dataset containing images of rice leaves affected by various diseases like blast, blight, spot, and tungro.

Functionality

  • Image Preprocessing: Utilizes Keras for image preprocessing, including data augmentation and normalization.
  • Model Training: Loads the pre-trained ResNet50 model and trains a new model on top of it, freezing the base layers and adding custom dense layers for classification.
  • Model Evaluation: Evaluates the trained model on a test dataset to measure accuracy and loss.
  • Prediction: Predicts the class of rice disease in both local images and images from online links.
  • Model Saving and Conversion: Saves the trained model to Google Drive and converts it to TensorFlow Lite (.tflite) format for deployment on mobile devices.

Usage

  • Access Dataset: Mounts Google Drive to access the dataset containing training, testing, and validation images.
  • Load Trained Model: Loads the pre-trained model from Google Drive for inference.
  • Image Preprocessing: Preprocesses images using Keras ImageDataGenerator.
  • Train Model: Trains the model using the pre-trained ResNet50 base and custom dense layers.
  • Test Image Links: Provides links to sample images for testing the model.
  • Save Model: Saves the trained model to Google Drive for future use.
  • Convert Model: Converts the saved .h5 model to TensorFlow Lite (.tflite) format for deployment.

Dependencies

  • TensorFlow
  • Keras
  • OpenCV
  • Matplotlib
  • Requests
  • PIL

Getting Started

  1. Ensure all necessary libraries are installed.
  2. Mount Google Drive to access the dataset and save the trained model.
  3. Load the pre-trained model or train a new one using the provided dataset.
  4. Evaluate the model's performance and save it to Google Drive.
  5. Convert the saved model to TensorFlow Lite format for deployment.

License

This project is licensed under the MIT License.

Acknowledgments

  • This project utilizes the power of deep learning and transfer learning with the ResNet50 architecture.

Contact

For any inquiries or suggestions, please contact:

Author

  • Name: Cyril K U

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.