Skip to content
Snippets Groups Projects
Commit 40e3f6f1 authored by Solene Tarride's avatar Solene Tarride
Browse files

Update documentation

parent 93b6bb0f
No related branches found
No related tags found
1 merge request!76Add predicted objects to predict command
......@@ -17,9 +17,11 @@ Use the `teklia-dan predict` command to predict a trained DAN model on an image.
| `--attention-map` | Whether to plot attention maps. | `bool` | `False` |
| `--attention-map-scale` | Image scaling factor before creating the GIF. | `float` | `0.5` |
| `--attention-map-level` | Level to plot the attention maps. Should be in `["line", "word", "char"]`. | `str` | `"line"` |
| `--predict-objects` | Whether to return polygons coordinates. | `bool` | `False` |
| `--predict-objects` | Whether to return polygons coordinates. | `bool` | `False` |
| `--word-separators` | List of word separators. | `list` | `[" ", "\n"]` |
| `--line-separators` | List of line separators. | `list` | `["\n"]` |
| `--threshold-method` | Method to use for attention mask thresholding. Should be in `["otsu", "simple"]`. | `str` | `"otsu"` |
| `--threshold-value ` | Threshold to use for the "simple" thresholding method. | `str` | `0` |
## Examples
......@@ -116,7 +118,8 @@ teklia-dan predict \
--output dan_humu_page/predict/ \
--scale 0.5 \
--attention-map \
--predict-objects
--predict-objects \
--threshold-method otsu
```
It will create the following JSON file named `dan_humu_page/predict/example.json` and a GIF showing a line-level attention map with extracted polygons `dan_humu_page/predict/example_line.gif`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment