Skip to content

Commit 67f25c6

Browse files
authored
[Docs] Update faq (#1817)
1 parent 6342ff2 commit 67f25c6

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docs/en/get_started/faq.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,19 @@ train_pipeline = [
2626

2727
In practice, we find that Totaltext contains some invalid polygons and using `FixInvalidPolygon` is a must. [Here](https://github.com/open-mmlab/mmocr/blob/27b6a68586b9a040678fe083bcf60662ae1b9261/configs/textdet/dbnet/dbnet_resnet18_fpnc_1200e_totaltext.py) is an example config.
2828

29+
**Q3** Getting `libpng warning: iCCP: known incorrect sRGB profile` when loading images with `cv2` backend.
30+
31+
**A** This is a warning from `libpng` and it is safe to ignore. It is caused by the `icc` profile in the image. You can use `pillow` backend to avoid this warning:
32+
33+
```python
34+
train_pipeline = [
35+
dict(
36+
type='LoadImageFromFile',
37+
imdecode_backend='pillow'),
38+
...
39+
]
40+
```
41+
2942
## Text Recognition
3043

3144
**Q1** What are the steps to train text recognition models with my own dictionary?
@@ -44,3 +57,27 @@ dictionary = dict(
4457
```
4558

4659
Now you are good to go. You can also find more information in [Dictionary API](https://mmocr.readthedocs.io/en/dev-1.x/api/generated/mmocr.models.common.Dictionary.html#mmocr.models.common.Dictionary).
60+
61+
**Q2** How to properly visualize non-English characters?
62+
63+
**A** You can customize `font_families` or `font_properties` in visualizer. For example, to visualize Korean:
64+
65+
`configs/textrecog/_base_/default_runtime.py`:
66+
67+
```python
68+
visualizer = dict(
69+
type='TextRecogLocalVisualizer',
70+
name='visualizer',
71+
font_families='NanumGothic', # new feature
72+
vis_backends=vis_backends)
73+
```
74+
75+
It's also fine to pass the font path to visualizer:
76+
77+
```python
78+
visualizer = dict(
79+
type='TextRecogLocalVisualizer',
80+
name='visualizer',
81+
font_properties='path/to/font_file',
82+
vis_backends=vis_backends)
83+
```

0 commit comments

Comments
 (0)