Skip to content

This repository utilizes TensorFlow Object Detection API for tomato leaf disease identification, including setup scripts, dataset preparation, model training, TensorFlow Lite conversion, and inference tools. It serves as a guide for efficient disease detection in agriculture.

License

Notifications You must be signed in to change notification settings

agrigoridou/Tomato-Leaf-Diseases-TensorFlow-Object-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tomato-Leaf-Diseases-TensorFlow-Object-Detection

image

This repository contains code for detecting tomato leaf diseases using TensorFlow Object Detection API. The project includes scripts to set up the environment, train a custom object detection model using TensorFlow 2.x, convert the trained model to TensorFlow Lite format, and perform inference using the TFLite model.

Installation

  1. Clone the TensorFlow models repository:

    !pip uninstall Cython -y 
    !git clone --depth 1 https://github.com/tensorflow/models
  2. Set up dependencies and environment:

    !pip install pyyaml==5.3
    !pip install /content/models/research/
    !pip install tensorflow==2.8.0
    !pip install tensorflow_io==0.23.1
    # Additional setup steps as per your environment requirements

Training

  1. Upload your image dataset and prepare training data:

    from google.colab import drive
    drive.mount('/content/gdrive')
    
    !cp /content/gdrive/MyDrive/ColabNotebooks/data.zip /content
    !cp /content/gdrive/MyDrive/ColabNotebooks/images.zip /content
    !unzip -q data.zip -d /content
    !unzip -q images.zip -d /content
  2. Customize the training configuration:

    # Modify model configurations, batch size, and other parameters
  3. Train the custom TensorFlow Lite detection model:

    # Run training and save the model in TensorFlow Lite format

Test

  1. Test the TensorFlow Lite model:

    # Perform inference with the TFLite model on test images

Example Results from Testing

Example GIF

mean Average Precision

  1. Calculate mAP (mean Average Precision):

    # Run mAP calculation on detection results

About

This repository utilizes TensorFlow Object Detection API for tomato leaf disease identification, including setup scripts, dataset preparation, model training, TensorFlow Lite conversion, and inference tools. It serves as a guide for efficient disease detection in agriculture.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published