{"id":17950945,"url":"https://github.com/brucemacd/xray-pneumonia-classifier","last_synced_at":"2025-10-04T19:46:14.926Z","repository":{"id":85118747,"uuid":"138759370","full_name":"BruceMacD/XRay-Pneumonia-Classifier","owner":"BruceMacD","description":"Classifying the presence of pneumonia in a chest x-ray.","archived":false,"fork":false,"pushed_at":"2019-07-07T06:18:53.000Z","size":6390,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-01T21:57:18.239Z","etag":null,"topics":[],"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/BruceMacD.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":"2018-06-26T15:43:20.000Z","updated_at":"2019-10-11T16:51:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"1da09d74-dd09-4940-ba70-a65eb631f8d1","html_url":"https://github.com/BruceMacD/XRay-Pneumonia-Classifier","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceMacD%2FXRay-Pneumonia-Classifier","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceMacD%2FXRay-Pneumonia-Classifier/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceMacD%2FXRay-Pneumonia-Classifier/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BruceMacD%2FXRay-Pneumonia-Classifier/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BruceMacD","download_url":"https://codeload.github.com/BruceMacD/XRay-Pneumonia-Classifier/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247033651,"owners_count":20872523,"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":[],"created_at":"2024-10-29T09:41:28.899Z","updated_at":"2025-10-04T19:46:09.865Z","avatar_url":"https://github.com/BruceMacD.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XRay-Pneumonia-Classifier\n\n## Project Description\nThe goal of this project is so classify the presence of pneumonia in a patient based off their chest x-ray. There are 3 different examples in the dataset (normal, bacterial pneumonia, and viral pneumonia). Our initial goal is to classify the yes/no question for if a patient has pneumonia. We will research a variety of models to see what is the most effective.\n\n## Dataset\nAvailable on Kaggle [1]. 5863 labelled x-ray images from a frontal view. There are 2 categories of normal/pneumonia.\n\n## Milestones\n* July 11, 2018\n1. Find a pre-trained neural net.\n* July 19, 2018\n2. Strip off the last few layers of the model and specialize them.\n* July 30, 2018\n3. Find some related work on weird stuff. \n\n## Installation:\n* [Running the Kaggle kernal is the easiest method of runnning this notebook.](https://www.kaggle.com/brucemacd/detecting-pneumonia-in-x-ray-images)\n* If you are running the notebook locally you must download the [data source](https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia) and extract it to the root of the directory of this repo.\n \n\nNotes:\n* Look into image processing (already greyscale but could use sharpening or something)\n* Do a basic CNN implementation, try some different hidden layer configurations\n* Look into AllCNN - https://arxiv.org/abs/1412.6806#\n* An Introduction to different Types of Convolutions in Deep Learning - https://towardsdatascience.com/types-of-convolutions-in-deep-learning-717013397f4d\n\nNotes from meeting with Dr. Oore:\n* Get a pre-trained net, strip off last few layers and specialize them.\n* Edge filters will be prelearned. \n* By adding a tiny bit where did we get on competition spread.\n* Using a fraction off the data what is the impact/risk on model?\n* If you do weird things show you looked for related work.\n* Fair bit of related work stuff.\n\nNotes from second meeting with Dr. Oore:\n* Project due week after classes are done (August 7)\n* Try stripping layers from pre-trained model, with a fully connected layer at the end\n* Take of different amounts of layers, freeze the pretrained layers and train the new ones\n* Data augmentation, we can do rotation, augmentation gives more examples.\n* Note why shaprening augmentation didnt work \n* Yes/No feature pre-processing\n* Different nets may have different cielings\n* Ensemble nets (vgg16 and simple net)\n\n\n## Resources (TODO: formatting)\n### General Resources\n1 - https://www.kaggle.com/paultimothymooney/chest-xray-pneumonia\n\n2 - https://cs231n.github.io/neural-networks-1/\n\n3 - https://github.com/bendidi/X-ray-classification\n\n4 - https://lhncbc.nlm.nih.gov/system/files/pub9175.pdf\n\n5 - https://arxiv.org/abs/1803.02315\n\n6 - http://www.steves-digicams.com/knowledge-center/brightness-contrast-saturation-and-sharpness.html (for data augmentation)\n\n7 - https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html\n\n8 - https://arxiv.org/pdf/1709.09902.pdf\n\n9 - https://arxiv.org/pdf/1502.03167.pdf%E7%9A%84paper%E9%80%82%E5%90%88%E6%83%B3%E6%B7%B1%E5%85%A5%E4%BA%86%E8%A7%A3%E5%8E%9F%E7%90%86%EF%BC%8C%E8%BF%99%E4%B8%AA%E8%A7%86%E9%A2%91%E5%BE%88%E6%B8%85%E6%A5%9A%E7%9A%84%E8%AE%B2%E4%BA%86bn%E8%B5%B7%E5%88%B0%E7%9A%84%E4%BD%9C%E7%94%A8%E3%80%82\n\n10 - Seperable Conv - https://arxiv.org/abs/1610.02357\n\n11 - where we got a bunch of code: https://mc.ai/detect-pneumonia-from-x-ray-using-convolutional-neural-network/\n\n### To explore\n1 - https://jacobgil.github.io/deeplearning/pruning-deep-learning\n\n2 - http://ruder.io/transfer-learning/  (This is basically what we're trying to do. Good to use from report; endorsement from Andrew Ng)\n\n3 - https://arxiv.org/pdf/1712.07632.pdf preprocessing xrays by removing bones to increase accuracy\n\n4 - https://stats.stackexchange.com/questions/191397/understanding-probabilistic-neural-networks Probablistic neural networks. \n\n#### Guided Backprop\n1 - http://www.cs.toronto.edu/~guerzhoy/321/lec/W07/HowConvNetsSee.pdf (Slide 14, Guided Backprop). Could be useful in getting our network to \"assume\" certain information about the xrays, like the fact that they are likely to contain pneumonia victims\n\n2 - https://arxiv.org/pdf/1412.6806.pdf The authority on gbp\n\n3 - https://github.com/Lasagne/Recipes/blob/master/examples/Saliency%20Maps%20and%20Guided%20Backpropagation.ipynb GBP with lasagne\n\n4 - https://ramprs.github.io/2017/01/21/Grad-CAM-Making-Off-the-Shelf-Deep-Models-Transparent-through-Visual-Explanations.html   GBP + GRAD-CAM explanation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucemacd%2Fxray-pneumonia-classifier","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrucemacd%2Fxray-pneumonia-classifier","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrucemacd%2Fxray-pneumonia-classifier/lists"}