{"id":23055145,"url":"https://github.com/sudarshanc00/potato-disease-classification","last_synced_at":"2026-04-08T18:01:36.394Z","repository":{"id":263388543,"uuid":"823742441","full_name":"SudarshanC00/Potato-Disease-Classification","owner":"SudarshanC00","description":"This machine learning project classifies potato leaf images into three categories: Early Blight, Late Blight, and Healthy. Using a CNN model, it accurately detects potato diseases based on leaf images. The project includes a FastAPI-powered web interface for image uploads and real-time classification results.","archived":false,"fork":false,"pushed_at":"2024-11-18T08:38:19.000Z","size":4971,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T15:40:29.333Z","etag":null,"topics":["css","fastapi","html","keras","matplotlib","python","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/SudarshanC00.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}},"created_at":"2024-07-03T16:07:20.000Z","updated_at":"2024-11-18T08:38:26.000Z","dependencies_parsed_at":"2024-11-18T09:00:20.848Z","dependency_job_id":null,"html_url":"https://github.com/SudarshanC00/Potato-Disease-Classification","commit_stats":null,"previous_names":["sudarshanc00/potato-disease-classification"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SudarshanC00/Potato-Disease-Classification","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudarshanC00%2FPotato-Disease-Classification","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudarshanC00%2FPotato-Disease-Classification/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudarshanC00%2FPotato-Disease-Classification/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudarshanC00%2FPotato-Disease-Classification/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SudarshanC00","download_url":"https://codeload.github.com/SudarshanC00/Potato-Disease-Classification/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SudarshanC00%2FPotato-Disease-Classification/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31567227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["css","fastapi","html","keras","matplotlib","python","tensorflow"],"created_at":"2024-12-16T01:10:51.866Z","updated_at":"2026-04-08T18:01:36.367Z","avatar_url":"https://github.com/SudarshanC00.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Potato Disease Classification\n\n## Tech Stack\n![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n![TensorFlow](https://img.shields.io/badge/TensorFlow-%23FF6F00.svg?style=for-the-badge\u0026logo=TensorFlow\u0026logoColor=white)\n![Keras](https://img.shields.io/badge/Keras-%23D00000.svg?style=for-the-badge\u0026logo=Keras\u0026logoColor=white) \n![Matplotlib](https://img.shields.io/badge/Matplotlib-%23ffffff.svg?style=for-the-badge\u0026logo=Matplotlib\u0026logoColor=black)\n![FastAPI](https://img.shields.io/badge/FastAPI-005571?style=for-the-badge\u0026logo=fastapi) \n![CSS3](https://img.shields.io/badge/css3-%231572B6.svg?style=for-the-badge\u0026logo=css3\u0026logoColor=white) \n![HTML5](https://img.shields.io/badge/html5-%23E34F26.svg?style=for-the-badge\u0026logo=html5\u0026logoColor=white) \n\n\n## Overview\nThis project is a machine learning application designed to classify potato leaf images into three categories: **Early Blight**, **Late Blight**, and **Healthy**. Using a convolutional neural network (CNN), the system accurately identifies and categorizes potato diseases based on leaf images. The project includes a web interface for uploading images and receiving classification results, powered by FastAPI.\n\n## Features\n- **Disease Classification**: Classifies potato leaf images into Early Blight, Late Blight, or Healthy.\n- **Web Interface**: Provides an HTML interface for image uploads and displays the predicted class and confidence score.\n- **API Endpoint**: Built with FastAPI, allowing image uploads for real-time predictions.\n\n## Directory Structure\n- **potato-disease/**\n  - **api/**\n    - `main.py`: FastAPI application with an endpoint for predicting the disease class of an uploaded image.\n    - `requirements.txt`: List of dependencies required to run the project.\n  - **saved_models/**\n    - `version_1_model`: Contains the first version of the trained model.\n    - `version_2_model`: Contains the second version of the trained model (optional for updates).\n  - **training/**\n    - `Potato_Disease_Detection.ipynb`: Jupyter Notebook containing code to train the CNN model on potato leaf images.\n  - **index.html**: HTML file providing a simple frontend interface for uploading images and displaying prediction results.\n\n## Installation\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/SudarshanC00/Potato-Disease-Classification.git\n   ```\n2. Navigate to the project directory:\n   ```bash\n   cd Potato-Disease-Classification/potato-disease/api\n   ```\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n4. Ensure your model is saved in the `saved_models/version_1_model` directory or update the path in `main.py` if necessary.\n\n## Usage\n1. **Start the FastAPI server**:\n   ```bash\n   uvicorn main:app --reload --host 127.0.0.1 --port 8000\n   ```\n2. **Access the Web Interface**:\n   - Open `index.html` in a browser to use the web interface for image uploads.\n   - Upload an image of a potato leaf, and click **Upload** to get the disease classification and confidence score.\n\n3. **Using the API**:\n   - Send a `POST` request to `http://localhost:8000/predict` with an image file to receive the classification.\n\n## Model Details\n- **Model Architecture**: A convolutional neural network (CNN) was used to classify potato leaf images.\n- **Classes**: The model predicts one of the following classes:\n  - Early Blight\n  - Late Blight\n  - Healthy\n- **Training Details**: The model was trained using images of potato leaves with different diseases, achieving high accuracy in distinguishing between classes.\n\n## Dependencies\n- **FastAPI**: For serving the API endpoint.\n- **Uvicorn**: ASGI server for running the FastAPI application.\n- **TensorFlow**: For loading and utilizing the trained CNN model.\n- **NumPy** and **Pillow**: For image preprocessing.\n\n## License\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudarshanc00%2Fpotato-disease-classification","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsudarshanc00%2Fpotato-disease-classification","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsudarshanc00%2Fpotato-disease-classification/lists"}