remove the CheckpointLoader from the train.json
Browse files- README.md +16 -2
- configs/metadata.json +2 -1
- configs/train.json +0 -10
- docs/README.md +16 -2
README.md
CHANGED
@@ -13,10 +13,24 @@ The [PyTorch model](https://drive.google.com/file/d/1I7UtWDKDEcezMqYiA-i_hsRTCrv
|
|
13 |

|
14 |
|
15 |
## Pre-trained weights
|
16 |
-
A pre-trained encoder weights would benefit the model training. In this bundle, the encoder is trained with pre-trained weights from some internal data.
|
17 |
|
18 |
1. Via setting the `use_imagenet_pretrain` parameter in the config file to `True`, [ImageNet](https://ieeexplore.ieee.org/document/5206848) pre-trained weights from the [EfficientNet-PyTorch repo](https://github.com/lukemelas/EfficientNet-PyTorch) can be loaded. Please note that these weights are for non-commercial use. Each user is responsible for checking the content of the models/datasets and the applicable licenses and determining if suitable for the intended use.
|
19 |
-
2. Via
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
## Data
|
22 |
Datasets used in this work were provided by [Activ Surgical](https://www.activsurgical.com/).
|
|
|
13 |

|
14 |
|
15 |
## Pre-trained weights
|
16 |
+
A pre-trained encoder weights would benefit the model training. In this bundle, the encoder is trained with pre-trained weights from some internal data. We provide two options to enable users to load pre-trained weights:
|
17 |
|
18 |
1. Via setting the `use_imagenet_pretrain` parameter in the config file to `True`, [ImageNet](https://ieeexplore.ieee.org/document/5206848) pre-trained weights from the [EfficientNet-PyTorch repo](https://github.com/lukemelas/EfficientNet-PyTorch) can be loaded. Please note that these weights are for non-commercial use. Each user is responsible for checking the content of the models/datasets and the applicable licenses and determining if suitable for the intended use.
|
19 |
+
2. Via adding a `CheckpointLoader` as the first handler to the `handlers` section of the `train.json` config file, weights from a local path can be loaded. Here is an example `CheckpointLoader`:
|
20 |
+
|
21 |
+
```json
|
22 |
+
{
|
23 |
+
"_target_": "CheckpointLoader",
|
24 |
+
"load_path": "/path/to/local/weight/model.pt",
|
25 |
+
"load_dict": {
|
26 |
+
"model": "@network"
|
27 |
+
},
|
28 |
+
"strict": false,
|
29 |
+
"map_location": "@device"
|
30 |
+
}
|
31 |
+
```
|
32 |
+
|
33 |
+
When executing the training command, if neither adding the `CheckpointLoader` to the `train.json` nor setting the `use_imagenet_pretrain` parameter to `True`, a training process would start from scratch.
|
34 |
|
35 |
## Data
|
36 |
Datasets used in this work were provided by [Activ Surgical](https://www.activsurgical.com/).
|
configs/metadata.json
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
-
"version": "0.5.
|
4 |
"changelog": {
|
|
|
5 |
"0.5.1": "add RAM warning",
|
6 |
"0.5.0": "update TensorRT descriptions",
|
7 |
"0.4.9": "update the model weights",
|
|
|
1 |
{
|
2 |
"schema": "https://github.com/Project-MONAI/MONAI-extra-test-data/releases/download/0.8.1/meta_schema_20220324.json",
|
3 |
+
"version": "0.5.2",
|
4 |
"changelog": {
|
5 |
+
"0.5.2": "remove the CheckpointLoader from the train.json",
|
6 |
"0.5.1": "add RAM warning",
|
7 |
"0.5.0": "update TensorRT descriptions",
|
8 |
"0.4.9": "update the model weights",
|
configs/train.json
CHANGED
@@ -137,16 +137,6 @@
|
|
137 |
"_target_": "SimpleInferer"
|
138 |
},
|
139 |
"handlers": [
|
140 |
-
{
|
141 |
-
"_target_": "CheckpointLoader",
|
142 |
-
"_disabled_": "@use_imagenet_pretrain",
|
143 |
-
"load_path": "/path/to/local/weight/model.pt",
|
144 |
-
"load_dict": {
|
145 |
-
"model": "@network"
|
146 |
-
},
|
147 |
-
"strict": false,
|
148 |
-
"map_location": "@device"
|
149 |
-
},
|
150 |
{
|
151 |
"_target_": "ValidationHandler",
|
152 |
"validator": "@validate#evaluator",
|
|
|
137 |
"_target_": "SimpleInferer"
|
138 |
},
|
139 |
"handlers": [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
{
|
141 |
"_target_": "ValidationHandler",
|
142 |
"validator": "@validate#evaluator",
|
docs/README.md
CHANGED
@@ -6,10 +6,24 @@ The [PyTorch model](https://drive.google.com/file/d/1I7UtWDKDEcezMqYiA-i_hsRTCrv
|
|
6 |

|
7 |
|
8 |
## Pre-trained weights
|
9 |
-
A pre-trained encoder weights would benefit the model training. In this bundle, the encoder is trained with pre-trained weights from some internal data.
|
10 |
|
11 |
1. Via setting the `use_imagenet_pretrain` parameter in the config file to `True`, [ImageNet](https://ieeexplore.ieee.org/document/5206848) pre-trained weights from the [EfficientNet-PyTorch repo](https://github.com/lukemelas/EfficientNet-PyTorch) can be loaded. Please note that these weights are for non-commercial use. Each user is responsible for checking the content of the models/datasets and the applicable licenses and determining if suitable for the intended use.
|
12 |
-
2. Via
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
## Data
|
15 |
Datasets used in this work were provided by [Activ Surgical](https://www.activsurgical.com/).
|
|
|
6 |

|
7 |
|
8 |
## Pre-trained weights
|
9 |
+
A pre-trained encoder weights would benefit the model training. In this bundle, the encoder is trained with pre-trained weights from some internal data. We provide two options to enable users to load pre-trained weights:
|
10 |
|
11 |
1. Via setting the `use_imagenet_pretrain` parameter in the config file to `True`, [ImageNet](https://ieeexplore.ieee.org/document/5206848) pre-trained weights from the [EfficientNet-PyTorch repo](https://github.com/lukemelas/EfficientNet-PyTorch) can be loaded. Please note that these weights are for non-commercial use. Each user is responsible for checking the content of the models/datasets and the applicable licenses and determining if suitable for the intended use.
|
12 |
+
2. Via adding a `CheckpointLoader` as the first handler to the `handlers` section of the `train.json` config file, weights from a local path can be loaded. Here is an example `CheckpointLoader`:
|
13 |
+
|
14 |
+
```json
|
15 |
+
{
|
16 |
+
"_target_": "CheckpointLoader",
|
17 |
+
"load_path": "/path/to/local/weight/model.pt",
|
18 |
+
"load_dict": {
|
19 |
+
"model": "@network"
|
20 |
+
},
|
21 |
+
"strict": false,
|
22 |
+
"map_location": "@device"
|
23 |
+
}
|
24 |
+
```
|
25 |
+
|
26 |
+
When executing the training command, if neither adding the `CheckpointLoader` to the `train.json` nor setting the `use_imagenet_pretrain` parameter to `True`, a training process would start from scratch.
|
27 |
|
28 |
## Data
|
29 |
Datasets used in this work were provided by [Activ Surgical](https://www.activsurgical.com/).
|