Skip to content

Commit 184e4e8

Browse files
committed
update readme and config of CHNCXR
1 parent 9688f58 commit 184e4e8

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

classification/CHNCXR/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this example, we finetune a pretrained resnet18 and vgg16 for classification
1717
1. First, we use resnet18 for finetuning, and update all the layers. Open the configure file `config/net_resnet18.cfg`. In the `dataset` section, set the value of `root_dir` as your path of "CXR_png". Then start to train by running:
1818

1919
```bash
20-
pymic_net_run_cls train config/net_resnet18.cfg
20+
pymic_net_run train config/net_resnet18.cfg
2121
```
2222

2323
2. During training or after training, run `tensorboard --logdir model/resnet18` and you will see a link in the output, such as `http://your-computer:6006`. Open the link in the browser and you can observe the average loss and accuracy during the training stage, such as shown in the following images, where blue and red curves are for training set and validation set respectively. The iteration number obtained the highest accuracy on the validation set was 1800, and may be different based on the hardware environment. After training, you can find the trained models in `./model/resnet18`.
@@ -30,7 +30,7 @@ pymic_net_run_cls train config/net_resnet18.cfg
3030

3131
```bash
3232
mkdir result
33-
pymic_net_run_cls test config/net_resnet18.cfg
33+
pymic_net_run test config/net_resnet18.cfg
3434
```
3535

3636
2. Then run the following command to obtain quantitative evaluation results in terms of accuracy.
@@ -47,4 +47,4 @@ The obtained accuracy by default setting should be around 0.8571, and the AUC is
4747

4848

4949
## Finetuning vgg16
50-
Similarly to the above example, we further try to finetune vgg16 for the same classification task. Use a different configure file `config/net_vg16.cfg` for training and testing. Edit `config/evaluation.cfg` accordinly for evaluation. The iteration number obtained the highest accuracy on the validation set was 2300, and the accuracy will be around 0.8797.
50+
Similarly to the above example, we further try to finetune vgg16 for the same classification task. Use a different configure file `config/net_vg16.cfg` for training and testing. Edit `config/evaluation.cfg` accordinly for evaluation. The iteration number for the highest accuracy on the validation set was 2300, and the accuracy will be around 0.8797.

classification/CHNCXR/config/net_resnet18.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tensor type (float or double)
33
tensor_type = float
44

5+
task_type = cls
56
root_dir = /home/guotai/disk2t/data/lung/ChinaSet_AllFiles/CXR_png
67
train_csv = config/cxr_train.csv
78
valid_csv = config/cxr_valid.csv

classification/CHNCXR/config/net_vgg16.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# tensor type (float or double)
33
tensor_type = float
44

5+
task_type = cls
56
root_dir = /home/guotai/disk2t/data/lung/ChinaSet_AllFiles/CXR_png
67
train_csv = config/cxr_train.csv
78
valid_csv = config/cxr_valid.csv

0 commit comments

Comments
 (0)