{"id":19525424,"url":"https://github.com/bektesfish/cnn-image-classification-web-application","last_synced_at":"2026-05-07T19:03:31.368Z","repository":{"id":261817754,"uuid":"885419203","full_name":"BEKtesfish/CNN-Image-Classification-Web-Application","owner":"BEKtesfish","description":"This web application classifies potato leaf health by detecting Potato Early Blight, Potato Late Blight, and healthy leaves based on uploaded images. It uses React for the frontend, FastAPI for the backend, and TensorFlow Serving for real-time predictions.","archived":false,"fork":false,"pushed_at":"2024-11-08T16:03:45.000Z","size":49292,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-26T01:43:24.719Z","etag":null,"topics":["cnn-classification","fastapi","react","tensorflowserving"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BEKtesfish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11-08T14:50:08.000Z","updated_at":"2024-11-08T16:21:15.000Z","dependencies_parsed_at":"2024-11-08T16:41:36.046Z","dependency_job_id":null,"html_url":"https://github.com/BEKtesfish/CNN-Image-Classification-Web-Application","commit_stats":null,"previous_names":["bektesfish/cnn-image-classification-web-application"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEKtesfish%2FCNN-Image-Classification-Web-Application","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEKtesfish%2FCNN-Image-Classification-Web-Application/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEKtesfish%2FCNN-Image-Classification-Web-Application/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BEKtesfish%2FCNN-Image-Classification-Web-Application/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BEKtesfish","download_url":"https://codeload.github.com/BEKtesfish/CNN-Image-Classification-Web-Application/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240777554,"owners_count":19855856,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cnn-classification","fastapi","react","tensorflowserving"],"created_at":"2024-11-11T01:04:24.087Z","updated_at":"2026-05-07T19:03:26.348Z","avatar_url":"https://github.com/BEKtesfish.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CNN Image Classification Web Application\n\nThis project is a web application that classifies potato leaf health based on uploaded images. It can detect *Potato Early Blight*, *Potato Late Blight*, and *Healthy Potato Leaves*, providing a confidence score for each prediction.\n\n## Project Overview\n\n- **Frontend**: Built with React, featuring a user-friendly interface for image upload via drag-and-drop or file selection.\n- **Backend**: FastAPI serves as the API layer, facilitating communication with the TensorFlow Serving model for real-time predictions.\n- **Model Deployment**: A pre-trained CNN model, hosted on TensorFlow Serving, processes input images and returns classification results.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./frontend/src/images/frontpage.png\" alt=\"Application Screenshot\" width=\"500\"/\u003e\n\u003c/p\u003e\n\n## Dataset\n\nThe model is trained on the [PlantVillage Dataset](https://www.kaggle.com/datasets/abdallahalidev/plantvillage-dataset), which includes labeled images of potato leaves with various conditions, helping to differentiate diseased and healthy samples.\np.s you can also find the Dataset here as a ZIP file: C:\\\u003cyour directory\u003e\\potato_classifier\\training\\PlantVillage.zip\n\n## Application Workflow\n\n1. **Model Training**: The CNN model was trained using the PlantVillage dataset and saved for deployment.\n2. **Model Deployment**: The trained model is deployed on TensorFlow Serving, accessed through FastAPI to serve predictions to the frontend.\n3. **Web Interface**: Users upload an image of a potato leaf, and the app displays the classification and confidence score.\n\n## Getting Started\n\nTo get a local copy of the project running, follow these steps:\n\n### Prerequisites\n\n1. **Clone the Repository**:\n    ```bash\n    git clone https://github.com/BEKtesfish/CNN-Image-Classification-Web-Application.git\n    CNN-Image-Classification-Web-Application\n    ```\n\n2. **Create and Activate a Virtual Environment**:\n    ```bash\n    python -m venv venv\n    source venv/bin/activate  # On Windows use `venv\\Scripts\\activate`\n    ```\n\n3. **Install Backend Dependencies**:\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n### Running the Application\n\n1. **Setup TensorFlow Serving**:\n   To serve the model with TensorFlow Serving, use Docker:\n   ```bash\n    docker run -t --rm -p 8501:8501 -v C:\u003cyour repository\u003e\\potato_classifier\\models:/models tensorflow/serving --rest_api_port=8501 --model_config_file=/potato_classifier/models.config\n    ```\n    For more details, see the [TensorFlow Serving Documentation](https://www.tensorflow.org/tfx/serving/docker).\n\n2. **Run the FastAPI Backend**:\n    Inside the api directory, start the backend server:\n    ```bash\n    cd api\n    python main-tf-serving.py\n    ```\n\n3. **Run the Frontend**:\n    Navigate to the frontend directory, install dependencies, and start the React app:\n    ```bash\n    cd ../front\n    npm install\n    npm start\n    ```\n\n4. **Access the Application**: Open your browser and go to http://localhost:3000. \n    Here, you’ll find a drag-and-drop section where you can upload an image of a \n    potato leaf to receive predictions and a confidence score\n\n### Additional Resources\nModel Training Notebook: In the training folder,contains the Jupyter notebook used for training the CNN model. and\nthe 1st version of the trained model can be found in the models folder ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbektesfish%2Fcnn-image-classification-web-application","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbektesfish%2Fcnn-image-classification-web-application","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbektesfish%2Fcnn-image-classification-web-application/lists"}