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
where you should provide the pretrained ImageNet model path in the corresponding configuration (`.yaml`) file. We provide a sample pretrained model extractor in `pretrained_models/`, but you can also write your own script.
74
+
73
75
Similarly, to test the model and generate segmentation results on Cityscapes, do
74
76
75
77
```sh
@@ -88,20 +90,32 @@ We provide some reasonably good pre-trained weights here so that one can quickly
**Example of how to use the pretrained ImageNet model to train on Cityscapes**:
93
97
1. Download the pretrained ImageNet `.pkl` file.
94
98
2. Put the model under `pretrained_models/` folder with some file name `[FILENAME]`.
95
-
3. In the corresponding `experiments/cityscapes/cls_MDEQ_XL.yaml`, set `PRETRAINED` to `"pretrained_models/[FILENAME]"`. Make sure you **don't** make it the `MODEL_FILE`.
96
-
4. Run the MDEQ segmentation training command (see the "Usage" section above).
99
+
3. In the corresponding `experiments/cityscapes/seg_MDEQ_[SIZE].yaml` (where `SIZE` is typically `SMALL`, `LARGE` or `XL`), set `MODEL.PRETRAINED` to `"pretrained_models/[FILENAME]"`.
100
+
4. Run the MDEQ segmentation training command (see the "Usage" section above):
(We'll soon update with the pretrained MDEQ-Large and MDEQ-Small ImageNet models!)
105
+
**Example of how to use the pretrained Cityscapes model for inference**:
106
+
1. Download the pretrained Cityscapes `.pkl` file
107
+
2. Put the model under `pretrained_models/` folder with some file name `[FILENAME]`.
108
+
3. In the corresponding `experiments/cityscapes/seg_MDEQ_[SIZE].yaml` (where `SIZE` is typically `SMALL`, `LARGE` or `XL`), set `TEST.MODEL_FILE` to `"pretrained_models/[FILENAME]"`.
109
+
4. Run the MDEQ segmentation testing command (see the "Usage" section above):
- To load the Cityscapes pretrained model, download the `.pkl` file below and specify the path in `config.[TRAIN/TEST].MODEL_FILE` (which is `''` by default) in the `.yaml` files.
104
-
- The difference between `[TRAIN/TEST].MODEL_FILE` and `MODEL.PRETRAINED` arguments in the yaml files: the former is used to load all of the model parameters; the latter is for compound training (e.g., when transferring from ImageNet to Cityscapes, we want to discard the final classifier FC layer).
117
+
- To load the Cityscapes pretrained model, download the `.pkl` file and specify the path in `config.[TRAIN/TEST].MODEL_FILE` (which is `''` by default) in the `.yaml` files. This is **different** from setting `MODEL.PRETRAINED`, see the point below.
118
+
- The difference between `[TRAIN/TEST].MODEL_FILE` and `MODEL.PRETRAINED` arguments in the yaml files: the former is used to load all of the model parameters; the latter is for compound training (e.g., when transferring from ImageNet to Cityscapes, we want to discard the final classifier FC layers).
105
119
- The repo supports checkpointing of models at each epoch. One can resume from a previously saved checkpoint by turning on the `TRAIN.RESUME` argument in the yaml files.
106
120
- Just like DEQs, the MDEQ models can be slower than explicit deep networks, and even more so as the image size increases (because larger images typically require more Broyden iterations to converge well; see Figure 5 in the paper). But one can play with the forward and backward thresholds to adjust the runtime.
0 commit comments