Skip to content

Commit 6e1206c

Browse files
authored
Update README.md
1 parent d60f3a8 commit 6e1206c

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

README.md

+15-5
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ You can download the version of the [Wireframe dataset](https://github.com/huang
2929

3030
All training parameters are located in configuration files in the folder `config`. Training SOLD² from scratch requires several steps, some of which taking several days, depending on the size of your dataset.
3131

32-
- <b>Step 1: Train on a synthetic dataset</b>
32+
<details>
33+
<summary><b>Step 1: Train on a synthetic dataset</b></summary>
3334

3435
The following command will create the synthetic dataset and start training the model on it:
3536
```bash
3637
python experiment.py --mode train --dataset_config config/synthetic_dataset.yaml --model_config config/train_detector.yaml --exp_name sold2_synth
3738
```
39+
</details>
3840

39-
- <b>Step 2: Export the raw pseudo ground truth on the Wireframe dataset with homography adaptation</b>
41+
<details>
42+
<summary><b>Step 2: Export the raw pseudo ground truth on the Wireframe dataset with homography adaptation</b></summary>
4043

4144
Note that this step can take one to several days depending on your machine and on the size of the dataset. You can set the batch size to the maximum capacity that your GPU can handle.
4245
```bash
@@ -47,8 +50,10 @@ You can similarly perform the same for the test set:
4750
```bash
4851
python experiment.py --exp_name wireframe_test --mode export --resume_path <path to your previously trained sold2_synth> --model_config config/train_detector.yaml --dataset_config config/wireframe_dataset.yaml --checkpoint_name <name of the best checkpoint> --export_dataset_mode test --export_batch_size 4
4952
```
53+
</details>
5054

51-
- <b>Step3: Compute the ground truth line segments from the raw data</b>
55+
<details>
56+
<summary><b>Step3: Compute the ground truth line segments from the raw data</b></summary>
5257

5358
```bash
5459
cd postprocess
@@ -57,8 +62,10 @@ cd ..
5762
```
5863

5964
We recommend testing the results on a few samples of your dataset to check the quality of the output, and modifying the hyperparameters if need be. Using a `detect_thresh=0.5` and `inlier_thresh=0.99` proved to be successful for the Wireframe dataset in our case for example.
65+
</details>
6066

61-
- <b>Step 4: Train the detector on the Wireframe dataset</b>
67+
<details>
68+
<summary><b>Step 4: Train the detector on the Wireframe dataset</b></summary>
6269

6370
We found it easier to pretrain the detector alone first, before fine-tuning it with the descriptor part.
6471
Uncomment the lines 'gt_source_train' and 'gt_source_test' in `config/wireframe_dataset.yaml` and fill them with the path to the h5 file generated in the previous step.
@@ -75,13 +82,16 @@ Lastly, you can resume a training that was stopped:
7582
```bash
7683
python experiment.py --mode train --dataset_config config/wireframe_dataset.yaml --model_config config/train_detector.yaml --exp_name sold2_wireframe --resume --resume_path <path to the model to resume> --checkpoint_name <name of the last checkpoint>
7784
```
85+
</details>
7886

79-
- <b>Step 5: Train the full pipeline on the Wireframe dataset</b>
87+
<details>
88+
<summary><b>Step 5: Train the full pipeline on the Wireframe dataset</b></summary>
8089

8190
You first need to modify the field 'return_type' in `config/wireframe_dataset.yaml` to 'paired_desc'. The following command will then train the full model (detector + descriptor) on the Wireframe dataset:
8291
```bash
8392
python experiment.py --mode train --dataset_config config/wireframe_dataset.yaml --model_config config/train_full_pipeline.yaml --exp_name sold2_full_wireframe --pretrained --pretrained_path <path ot the pre-trained sold2_wireframe> --checkpoint_name <name of the best checkpoint>
8493
```
94+
</details>
8595

8696

8797
### Pretrained models

0 commit comments

Comments
 (0)