{"id":28065975,"url":"https://github.com/gateremark/plant_disease_ml_model1","last_synced_at":"2026-05-07T11:31:32.641Z","repository":{"id":273772105,"uuid":"629210305","full_name":"gateremark/Plant_Disease_ML_Model1","owner":"gateremark","description":"Plant Disease Classification using ResNet50","archived":false,"fork":false,"pushed_at":"2023-04-17T21:49:26.000Z","size":284,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-10T04:24:25.261Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","image-classification","keras","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gateremark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-17T21:19:03.000Z","updated_at":"2023-11-24T13:21:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"885ccf44-96db-467d-af09-ca5cf0d1f8c8","html_url":"https://github.com/gateremark/Plant_Disease_ML_Model1","commit_stats":null,"previous_names":["gateremark/plant_disease_ml_model1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gateremark/Plant_Disease_ML_Model1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gateremark%2FPlant_Disease_ML_Model1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gateremark%2FPlant_Disease_ML_Model1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gateremark%2FPlant_Disease_ML_Model1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gateremark%2FPlant_Disease_ML_Model1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gateremark","download_url":"https://codeload.github.com/gateremark/Plant_Disease_ML_Model1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gateremark%2FPlant_Disease_ML_Model1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735080,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convolutional-neural-networks","deep-learning","image-classification","keras","tensorflow"],"created_at":"2025-05-12T14:34:59.676Z","updated_at":"2026-05-07T11:31:32.635Z","avatar_url":"https://github.com/gateremark.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plant Disease Classification with ResNet50\n\nThis repository contains a Python script for fine-tuning the pre-trained ResNet50 model for plant disease classification, using TensorFlow and Keras.\n\n## Table of Contents\n- [Overview](#overview)\n- [Dependencies](#dependencies)\n- [Dataset](#dataset)\n- [Usage](#usage)\n- [Results](#results)\n- [Credits](#credits)\n\n## Overview\nThe `pv_resnet50.ipynb` script imports the necessary libraries for the task, including ResNet50 from Keras Applications. After mounting Google Drive to the Colab environment and unzipping the dataset, the script sets several parameters for data preprocessing and creates data generators for training and validation.\n\nNext, the script defines custom metrics functions and modifies the fully connected layers of the pre-trained ResNet50 model to fit the number of classes in the PlantVillage dataset. The model is compiled and trained on the generator data, with callbacks to monitor early stopping and best models.\n\nFinally, the trained model is saved in h5 format, and utility functions are provided for preprocessing input images and returning predicted class labels.\n\n## Dependencies\nThe following libraries and versions were used for this project:\n- Python\n- tensorflow 2\n- Keras\n- numpy\n- matplotlib\n\n## Dataset\nThe PlantVillage dataset was used for this project, which consists of over 54,000 images of healthy and diseased plants in ~40 different classes. The dataset can be downloaded on [Kaggle - PlantVillage](https://www.kaggle.com/datasets/abdallahalidev/plantvillage-dataset).\n\n## Usage\nTo run the script, follow these steps:\n\n1. Clone this repository.\n```\ngit clone https://github.com/gateremark/Plant_Disease_ML_Model1.git\n```\n\n2. Download the [PlantVillage](https://www.kaggle.com/datasets/abdallahalidev/plantvillage-dataset) dataset and place it in your Google Drive.\n\n3. Update the `base_path`, `train_data_dir`, and `val_data_dir` variables in the script to point to the correct directories of the PlantVillage dataset.\n\n4. Open the script in Google Colab, and run the cells.\n\n## Results\nThe trained ResNet50 model achieved an accuracy of ~95% after 20 epochs of training on the PlantVillage dataset. The model can be used to classify new input images of plants into their respective disease categories.\n\n## Credits\n- [PlantVillage-Dataset](https://www.kaggle.com/datasets/abdallahalidev/plantvillage-dataset)\n- [Deep Residual Networks (ResNet, ResNet50)](https://viso.ai/deep-learning/resnet-residual-neural-network/)\n- [Victor Ndaba](https://github.com/ndaba1)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgateremark%2Fplant_disease_ml_model1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgateremark%2Fplant_disease_ml_model1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgateremark%2Fplant_disease_ml_model1/lists"}