Skip to content

Commit b344e85

Browse files
authored
Update README.md
1 parent 3bca0e4 commit b344e85

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ You can use `BoxDetect` either by leveraging one of the pre-made pipelines or by
5252
- [Using `boxdetect.pipelines.get_checkboxes` to retrieve checkboxes and their values](#using-boxdetectpipelinesget_checkboxes-to-retrieve-and-recognize-just-the-checkboxes)
5353
- [Using `boxdetect.config.PipelinesConfig.autoconfigure` to setup a config params based on the box sizes list](#using-boxdetectconfigpipelinesconfigautoconfigure-to-quickly-and-easily-setup-a-config-params-based-on-the-box-sizes-list)
5454
- [Using `boxdetect.config.PipelinesConfig.autoconfigure_from_vott` to setup a config params based on the annotated ground truth](#using-boxdetectconfigpipelinesconfigautoconfigure_from_vott-to-quickly-and-easily-setup-a-config-params-based-on-the-annotated-ground-truth)
55+
- [Saving and loading configuration to and from `yaml` files](#Saving-and-loading-configuration-to-and-from-yaml-files)
5556

5657

5758
## Using `boxdetect.pipelines`
@@ -222,3 +223,18 @@ from boxdetect.pipelines import get_checkboxes
222223

223224
checkboxes = get_checkboxes(file_path, cfg=cfg, plot=False)
224225
```
226+
227+
### Saving and loading configuration to and from `yaml` files
228+
[[back to usage examples]](#usage-examples)
229+
230+
If you want to save a specific configuration for later reusability or automation purposes you can do so by using `PipelinesConfig` functions: `save_yaml` and `load_yaml` like below:
231+
232+
```python
233+
from boxdetect import config
234+
235+
cfg = config.PipelinesConfig()
236+
cfg.morph_kernels_thickness = 10
237+
cfg.save_yaml('test_cfg.yaml')
238+
239+
cfg2.load_yaml('test_cfg.yaml')
240+
```

0 commit comments

Comments
 (0)