Content
ResNet Descriptions
ResNet was proposed in 2015, it is a typoe of neural network that directly consumes 2D images.
Paper Farooq M, Hafeez A. Covid-resnet: A deep learning framework for screening of covid19 from radiographs. arXiv preprint arXiv:2003.14395. 2020 Mar 31.
Model Architecture
The ResNet classification network takes n 2D images as input, applies input and feature transformations. BN is introdued before each ReLU.
Dataset
Dataset used: [Covid-19 CT Image Dataset]
- Dataset size: 1.2G
- Train: 92M, 1716+1851 images and corresponding labels.
- Test: 23M, 429+463
- Data format: png/jpg files
- Notes: Data will be processed in src/dataset.py
Environment Requirements
- Hardware(Ascend)
- Prepare hardware environment with Ascend processor.
- Framework
- For more information, please check the resources below:
Quick Start
After installing MindSpore via the official website, you can start training and evaluation as follows:
# enter script dir, train PointNet
sh run_train_ascend.sh
# enter script dir, evaluate PointNet
sh run_eval.sh
Script Description
.
├── README.md
├── eval.py
├── eval_log.txt
├── resnet.ckpt
├── scripts
│ ├── run_eval.sh
│ └── run_train_ascend.sh
├── src
│ ├── __pycache__
│ │ ├── dataset.cpython-37.pyc
│ │ └── utils.cpython-37.pyc
│ ├── dataset.py
│ └── utils.py
├── suwen-1.0.1-py3-none-any.whl
├── train.py
└── train_log.txt
3 directories, 13 files
Script Parameters
Major parameters in train.py are as follows:
--data_path: The absolute full path to the train and evaluation datasets.
--ckpt_path: The absolute full path to the checkpoint file saved after training.
More hyperparamteters can be modified in src/config.py.
Training Process
-
running on Ascend
sh run_train_ascend.sh
After training, the loss value will be achieved as what in train_log.txt
The model checkpoint will be saved in the current ckpt directory.
Evaluation Process
Evaluation
Before running the command below, please check the checkpoint path used for evaluation.
Model Description
Performance
Training Performance
Parameters |
|
Resource |
Ascend 910; CPU 2.60GHz, 24cores; Memory, 96G |
uploaded Date |
11/23/2021 (month/day/year) |
MindSpore Version |
1.3.0 |
Dataset |
Covid-Classification |
Training Parameters |
epoch=100, batch_size =32 , lr=0.01 |
Optimizer |
Adam |
Loss Function |
Softmax Cross Entropy |
outputs |
probability |
Loss |
SoftmaxCrossEntropyWithLogits |
Speed |
19ms/step |
Total time |
1900ms |
Checkpoint for Fine tuning |
180M (.ckpt file) |
Inference Performance
Parameters |
|
Resource |
Ascend 910; CPU 2.60GHz, 24cores; Memory, 96G |
uploaded Date |
11/23/2021 (month/day/year) |
MindSpore Version |
1.3.0 |
Dataset |
Covid-Classification |
batch_size |
1 |
outputs |
probability |
Accuracy |
96.99% |