You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
β₯ Some Instructions and Guidelines for Code Execution
All scripts are exactly the same with the notebooks having same titles.
Any necessary package to be installed is placed on top of each of the six scripts/notebooks.
Scripts/Notebooks are using kaggle and Colab collectively, so will contain some exclusive operations as per the platform like importing data from kaggle to colab needs a unique API key, mounting drive and authentication, etc
β₯ Following are the details about the scripts/notebooks
β task1_preprocessing_plus_unet_with_comments.py ---> Contains the maximum number of comments and explanation. Any doubt, if persists probably could be rectified here. It contains the UNet training for infection mask prediction (Task- 1)
β task1_crossval_3folds_unet.py --> Contains the cross-validation (3-folds) for TASK-1.
β task1_crossval_4folds_unet.py --> Contains the cross-validation (4-folds) for TASK-1.
β task1_unet_plus_plus.py --> Contains the unet++ training for TASK-1.
β task2_covid19_classifcation.py --> Contains the covid-19 classification (TASK-2).
β task3_lung_segmentation_unet.py --> Contains Unet training for lung segmentation (TASK-3).
β app.py --> Contains a runner code for running any file listed above.
1.) Removing incomplete and fauty images
2.) Separate model for empty mask prediction
3.) Use of Contrast Limited Adaptive Histogram Equalization (
) for image enhancement
4.) Cropping the Region of Interst (ROI) using Otsu's binarization and other approaches
5.) Data Augmentation
Cropping out contour with the largest area
CLAHE only Output
Before-After Image (after all preprocessing steps)
β’ We can say that IOU(J) is always more punishing or has less value than the corresponding dice(S) at the same threshold.
β’ Another takeaway is that ππ½/ππ = 2/[(2 βπ )]^2 which is basically the slope and is a continuous
increasing function for S β [0,1].
β’ For (S = 0.586, J = 0.414), the value of slope equals to 1.
β’ Above two points combinedly establishes a relationship that for all S > 0.586,
rate of increase of IOU is greater than the dice whereas for all S < 0.586, the rate of increase
of dice is greater than the IOU.
Training Stage
(Remains same for all tasks)
Exponential decaying LR (Step and continuous)
Exponential decaying LR (Step and continuous) with Variation
Cosine Annealing Cyclical LR
Blend of Cosine Annealing and Exponential Decay
Results with UNet (Task: 1)
Trianing curve for Dice Coefficient
Training curve for BCE + Dice Loss
Optimizing threshold with small step size
Precision and recall curves v/s thresholds
Some Actual Vs Predicted Masks
Some Actual Vs Predicted Masks
4-Fold Cross-validation Results on Task: 1 (UNet)
4-fold threshold vs split number dataframe for DICE
Brief report acquired from dataframe
4-fold threshold vs split number dataframe for IOU
Brief report acquired from dataframe
4-fold threshold vs split number dataframe for PRECISION
Brief report acquired from dataframe
4-fold threshold vs split number dataframe for RECALL
Brief report acquired from dataframe
Some Actual v/s Predicted Masks by 4 Unet models of 4-fold Cross-Validation
Results with UNet++ (Task: 1)
Training curve for Dice Coefficient
Training curve for BCE + Dice Loss
Optimizing threshold with small step size
Results with CNN (Task: 2)
Classification loss curve
Distribution of TN, TP, FN, FP with Threshold 0.50
Distribution of TN, TP, FN, FP with Best Threshold 0.81
ROC Curve with Threshold 0.50
ROC Curve with Threshold 0.81
Confusion matrix with Threshold 0.50
Confusion matrix with Best Threshold 0.81
Results with UNet (Task: 3)
Training curve for Dice Coefficient
Training curve for BCE + Dice Loss
Optimizing threshold with small step size
Actual v/s Predicted Lung Masks
Actual v/s Predicted Lung Masks
License
MIT License
Copyright (c) 2020 Rohit Verma
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.