{"id":22190961,"url":"https://github.com/ayushpatel2026/cnn-malaria","last_synced_at":"2026-05-13T07:04:19.119Z","repository":{"id":265154687,"uuid":"895298020","full_name":"Ayushpatel2026/cnn-malaria","owner":"Ayushpatel2026","description":"End-to-end ML Project - CNN Classifier","archived":false,"fork":false,"pushed_at":"2024-12-16T13:56:15.000Z","size":101957,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T01:14:42.830Z","etag":null,"topics":["dvc","machine-learning","mlops","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/Ayushpatel2026.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-11-28T00:05:57.000Z","updated_at":"2024-12-16T13:56:19.000Z","dependencies_parsed_at":"2024-12-05T01:22:04.490Z","dependency_job_id":null,"html_url":"https://github.com/Ayushpatel2026/cnn-malaria","commit_stats":null,"previous_names":["ayushpatel2026/cnn-malaria"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushpatel2026%2Fcnn-malaria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushpatel2026%2Fcnn-malaria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushpatel2026%2Fcnn-malaria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ayushpatel2026%2Fcnn-malaria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ayushpatel2026","download_url":"https://codeload.github.com/Ayushpatel2026/cnn-malaria/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351757,"owners_count":20601087,"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":["dvc","machine-learning","mlops","python","tensorflow"],"created_at":"2024-12-02T12:13:33.706Z","updated_at":"2026-05-13T07:04:14.094Z","avatar_url":"https://github.com/Ayushpatel2026.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Malaria Diagnosis with Convolutional Neural Networks**\n\nThis project leverages Convolutional Neural Networks (CNNs) to classify blood cell images as either infected (parasitized) or uninfected with malaria. Achieving an accuracy of **94%**, this solution demonstrates the use of modern machine learning techniques and MLOps principles to build a robust, modular, and collaborative pipeline.\n\n## **Key Features**\n- **High Accuracy**: Achieved 94% classification accuracy on the dataset.\n- **End-to-End Pipeline**: Built modular pipelines for:\n  - **Data Ingestion**: Loading and managing the dataset.\n  - **Data Processing**: Preprocessing images and applying data augmentation.\n  - **Model Training**: Custom training routines with learning rate scheduling and regularization.\n  - **Model Evaluation**: Evaluating model performance using test data.\n- **MLOps Principles**: Designed for **reproducibility** and **collaboration**:\n  - Modular and reusable code.\n  - Streamlined pipelines for clear separation of tasks and used DVC to keep track of the pipelines \n  - Scalable and extensible for future improvements.\n- **Technologies Used**:\n  - **TensorFlow** and **Keras**: Model development and training.\n  - **Matplotlib**: Data visualization and analysis.\n  - **Flask**: To make a user friendly web application\n  - **DVC**: To keep track of the pipelines and models for reproducibility and traceability\n  - **Jupyter Notebook**: For initial prototyping and testing.\n\n## **Project Workflow**\n\n### 1. **Initial Prototyping**\n- Explored and visualized the dataset and tested early CNN models in **Jupyter Notebook** (research/MalariaDiagnosis.ipynb).\n- Fine-tuned hyperparameters, implemented **data augmentation**, and evaluated initial performance.\n\n### 2. **End-to-End Pipeline**\n- Transitioned to a **modular pipeline structure** for scalability and collaboration:\n  - **Data Ingestion**: Reads and prepares data for training and testing.\n  - **Data Processing**: Applies transformations like resizing, normalization, and augmentation.\n  - **Training**: Trains the CNN using the ADAM optimizer and learning rate scheduling for better performance.\n  - **Evaluation**: Validates the model's accuracy and loss on test data.\n\n### 3. **Model Features**\n- **Data Augmentation**: Increases dataset diversity with techniques like flipping and rotation.\n- **Learning Rate Scheduling**: Dynamically adjusts the learning rate during training to optimize convergence.\n- **Custom Callbacks**: Monitors performance metrics and enables early stopping to prevent overfitting.\n\n# Flask App\n\nA wep application was made using Flask to provide a user friendly way to upload cell images and get a prediction from the model. \nBelow are two images from the wep application: with a cell that is uninfected and one with a parasitized cell. \n\n## **Example: Uninfected Cell**\n![Uninfected Cell](images/web_app_uninfected.png)\n\n## **Example: Parasitized Cell**\n![Parasitized Cell](images/web_app_parasitized.png)\n\n# How to run?\n### STEPS:\n\nClone the repository\n\n```bash\ngit clone https://github.com/Ayushpatel2026/cnn-malaria\n```\n### STEP 01- Create a conda environment after opening the repository\n\n```bash\nconda create -n cnn-malaria python=3.9 -y\n```\n\n```bash\nconda activate cnn-malaria\n```\n\n\n### STEP 02- install the requirements\n```bash\npip install -r requirements.txt\n```\n\n```bash\n# Finally run the following command\npython app.py\n```\nNow, open up the application on your local host and port\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushpatel2026%2Fcnn-malaria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fayushpatel2026%2Fcnn-malaria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fayushpatel2026%2Fcnn-malaria/lists"}