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: docs/en/get_started/faq.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,19 @@ train_pipeline = [
26
26
27
27
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.
28
28
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
+
29
42
## Text Recognition
30
43
31
44
**Q1** What are the steps to train text recognition models with my own dictionary?
@@ -44,3 +57,27 @@ dictionary = dict(
44
57
```
45
58
46
59
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:
0 commit comments