Data modeling submodule for Udacity's Machine Learning Engineering Nanodegree program.
pytorchcv
sklearn
fastai #(v1)
numpy
torch
torchvision
tracemalloc
pthflops
plotly_express
The notebook in this repo provides detailed steps on building and executing this end-to-end Fast.ai Image Classification pipeline. When running the notebook in a Jupyter environment, be sure to upload and extract the output zip file -- and designate the extracted folder as your path-- from the data preprocessing submodule as well as train and test .csv label files, and the common.py module to patch the pytorchcv lib's Swish Activation implementation with a more memory-efficient one:
Base Architecture: CovidNet | Blocks |
---|---|
COVID-Net Illustration (L. Wang and A. Wong., 2020)
Check out my project proposal for more info.
Model was trained in Google Colab with the following GPU:
Each phase utilizes the "One-cycle training strategy" provided with Fastai learner class.
Phase | Epochs | Tuned Hyperparams |
---|---|---|
|
||
|
Input Size* | FLOPs | GFLOPs |
---|---|---|
(1, 3, 240, 240) | 718,097,040 | 0.72 |
- Fore details about FLOPs per layer, see notebook for Fastai Learner Callback and helpers, measuring RAM usage.
Label | Precision | Specificity | Sensitivity | F1 |
---|---|---|---|---|
Pneumonia | 0.943256 | 0.965595 | 0.949438 | 0.946337 |
COVID-19 | 0.938776 | 0.998882 | 0.958333 | 0.948454 |
Normal | 0.966916 | 0.956911 | 0.962112 | 0.964508 |
Label | Precision | Specificity | Sensitivity | F1 |
---|---|---|---|---|
Pneumonia | 0.93178 | 0.958628 | 0.942761 | 0.937238 |
COVID-19 | 0.965517 | 0.999326 | 0.903226 | 0.933333 |
Normal | 0.959091 | 0.956911 | 0.953672 | 0.956374 |
1 COVID-Net: A Tailored Deep Convolutional Neural Network Design for Detection of COVID-19 Cases from Chest X-Ray Image. L. Wang and A. Wong., 2020.
2 A Disciplined Approach to Neural Network Hyper-Parameters: Part 1 - Learniing Rate, Batch Size, Momentum, and Weight Decay. L Smith., 2018.