Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Cotton Disease Classification using Transfer Learning with InceptionV3

Overview

This project aims to classify images of cotton plants into different disease categories using transfer learning with the InceptionV3 architecture. Transfer learning involves leveraging pre-trained models to solve similar problems efficiently by reusing learned features.

Project Structure

  • Importing Libraries: Necessary libraries such as TensorFlow, Keras, NumPy, glob, and Matplotlib are imported.
  • Setting Image Size: Images are resized to 224x224 pixels, as required by the InceptionV3 model.
  • Loading InceptionV3 Model: The InceptionV3 model pre-trained on the ImageNet dataset is loaded without the top layer.
  • Freezing Layers: All layers in the InceptionV3 model are frozen to prevent them from being trained again.
  • Adding Custom Layers: Custom layers are added on top of the InceptionV3 model for classification.
  • Compiling the Model: The model is compiled with categorical cross-entropy loss and the Adam optimizer.
  • Data Preprocessing: Image data generators are used to preprocess and augment the training and testing images.
  • Loading Training and Testing Data: Training and testing data are loaded using flow_from_directory method.
  • Model Training: The model is trained using the fit_generator method with the specified number of epochs.
  • Plotting Loss and Accuracy: Loss and accuracy curves are plotted for visualization.
  • Making Predictions: The model is used to make predictions on the testing set.
  • Saving Predictions: Predictions are saved for further analysis.

Results

  • The model achieved high accuracy on both the training and testing sets.
  • Loss and accuracy curves indicate that the model is not overfitting.

Conclusion

This project demonstrates the effectiveness of transfer learning in classifying cotton plant diseases using the InceptionV3 architecture. The trained model can be deployed in real-world applications for early detection and management of cotton diseases, contributing to sustainable agriculture practices.

Future Improvements

  • Fine-tuning the model by unfreezing some layers for further improvement.
  • Experimenting with different pre-trained models and hyperparameters.
  • Collecting more diverse and extensive datasets to improve model generalization.

About

This project aims to classify images of cotton plants into different disease categories using transfer learning with the InceptionV3 architecture.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages