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
Copy file name to clipboardexpand all lines: README.md
+15-5
Original file line number
Diff line number
Diff line change
@@ -29,14 +29,17 @@ You can download the version of the [Wireframe dataset](https://github.com/huang
29
29
30
30
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.
31
31
32
-
- <b>Step 1: Train on a synthetic dataset</b>
32
+
<details>
33
+
<summary><b>Step 1: Train on a synthetic dataset</b></summary>
33
34
34
35
The following command will create the synthetic dataset and start training the model on it:
- <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>
40
43
41
44
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.
42
45
```bash
@@ -47,8 +50,10 @@ You can similarly perform the same for the test set:
47
50
```bash
48
51
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
49
52
```
53
+
</details>
50
54
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>
52
57
53
58
```bash
54
59
cd postprocess
@@ -57,8 +62,10 @@ cd ..
57
62
```
58
63
59
64
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>
60
66
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>
62
69
63
70
We found it easier to pretrain the detector alone first, before fine-tuning it with the descriptor part.
64
71
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:
75
82
```bash
76
83
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>
77
84
```
85
+
</details>
78
86
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>
80
89
81
90
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:
82
91
```bash
83
92
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>
0 commit comments