ayush1997/Xvision
소개
Chest Xray image analysis using Deep learning !
디자인 및 미디어측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalXvision
Chest Xray image analysis using Deep Learning and exploiting Deep Transfer Learning technique for it with Tensorflow.
The maxpool-5 layer of a pretrained VGGNet-16(Deep Convolutional Neural Network) model has been used as the feature extractor here and then further trained on a 2-layer Deep neural network with SGD optimizer and Batch Normalization for classification of Normal vs Nodular Chest Xray Images.
Nodular vs Normal Chest Xray

Some specifications
| Property | Values |
|---|---|
| Pretrained Model | VggNet-16 |
| Optimizer used | stochastic gradient descent(SGD) |
| Learning rate | 0.01 |
| Mini Batch Size | 20 |
| Epochs | 20 |
| 2 Layers | 512x512 |
| GPU trained on | Nvidia GEFORCE 920M |
Evaluation
Confusion Matrix and Training Error Graph

| Normal | Nodule | |
|---|---|---|
| Precision | 0.7755102 | 0.55555556 |
| Recall | 0.76 | 0.57692308 |
Accuracy : 69.3333 %
DataSet
openi.nlm.nih.gov has a large base of Xray,MRI, CT scan images publically available.Specifically Chest Xray Images have been scraped, Normal and Nodule labbeled images are futher extrated for this task.
How to use ?
The above code can be used for Deep Transfer Learning on any Image dataset to train using VggNet as the PreTrained network.
Steps to follow
- Download Data- the script download images and saves corresponding disease label in json format.
python scraper.py <path/to/folder/to/save/images>
- Follow the
scraper/process.ipynbnotebook for Data processing and generate
- Training images folder - All images for training
- Testing images Folder - All images for testing
- Training image labels file - Pickled file with training labels
- Testing image labels file - Pickled file with testing labels
Extract features(CNN Codes) from the maxpool:5 layer of PreTrained CovNet(VggNet) and save them beforehand for faster training of Neural network.
python train.py <Training images folder> <Testing image folder> <Train images codes folder > <Test images codes folder>- Train images codes folder - Path where training images codes will be stored
- Test images codes folder - Path where testing images codes will be stored
The extracted features are now used for training our 2-Layer Neural Network from scratch.The computed models are saved as tensorflow checkpoint after every Epoch.
python train_model.py <Training images folder> <Train images codes folder> <Training image labels file> <Folder to save models>Finally the saved models are used for making predictions.Confusion Matrix is used as the Performance Metrics for this classifcation task.
python test_model.py <Testing images folder> <Test images codes folder> <Testing image labels file> <Folder with saved models>
Some Predictions

References
Contribute
If you want to contribute and add new feature feel free to send Pull request here :D
To report any bugs or request new features, head over to the Issues page
To-do
- Implement saliency map or use Deconv for better visualizations.
관련 프로젝트 살펴보기
불러오는 중…