-
-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathowocr_config.ini
More file actions
225 lines (169 loc) · 8.04 KB
/
Copy pathowocr_config.ini
File metadata and controls
225 lines (169 loc) · 8.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
[general]
;Note: all lines starting with a ";" are comments, you need to remove the ";"
;to make the line apply.
;Where to read input images from. Can be either "clipboard", "websocket",
;"unixsocket" (on macOS/Linux), "screencapture", "obs", or a path to a directory.
;read_from = clipboard
;Optional secondary source to read input images from. Same options as
;read_from, but they can't both be directory paths.
;read_from_secondary =
;Where to save recognized texts to. Can be either "clipboard", "websocket", or a
;path to a directory to write text/json files to.
;write_to = clipboard
;OCR engines to load, separated by commas. Available: avision,alivetext,bing,
;glens,gvision,azure,mangaocr,mangaocrs,winrtocr,oneocr,easyocr,rapidocr,
;ocrspace,meikiocr
;engines = avision,alivetext,bing,glens,gvision,screenai,azure,mangaocr,mangaocrs,winrtocr,oneocr,ndlocrlite,easyocr,rapidocr,ocrspace,meikiocr
;OCR engine to use.
;engine =
;Local OCR engine to use for two-pass screen capture processing.
;engine_secondary =
;Pause at startup.
;pause_at_startup = False
;Automatically pause the program after the specified amount of seconds since
;the last successful text recognition. 0 to disable.
;auto_pause = 0
;Delete image files after processing when reading from a directory.
;delete_images = False
;Skip existing images at startup when reading from a directory.
;skip_existing_images = False
;Delay (in seconds) between checks when reading from clipboard (on macOS/Linux)
;or a directory.
;delay_seconds = 0.5
;Websocket port to use if reading or writing to websocket.
;websocket_port = 7331
;OBS websocket connection settings.
;obs_host = localhost
;obs_port = 4455
;obs_password =
;JPEG quality to use when capturing images from OBS. -1 means lossless png image
;will be used.
;obs_quality = 75
;Override the source name to capture from OBS. By default, the current program
;scene is used. "preview" will use the preview scene instead.
;obs_source_override =
;Show an operating system notification with the detected text. Will be ignored
;when reading with screen capture and periodic screenshots.
;notifications = False
;Show an operating system tray icon, allowing to change the engine,
;pause/unpause, change the screen capture area selection, take a screenshot,
;and launch the configuration interface. Doesn't apply to the packaged versions.
;tray_icon = True
;Show the log viewer window at startup. Only applies to the packaged versions.
;show_log_at_startup = True
;Combo to wait on for pausing the program. As an example: <ctrl>+<shift>+p.
;The list of keys can be found here:
;https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key
;combo_pause =
;Combo to wait on for switching the OCR engine. As an example:
;<ctrl>+<shift>+a. The list of keys can be found here:
;https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key
;combo_engine_switch =
;Area to target when reading with screen capture. Can be either empty
;(automatic selector, hold CTRL/cmd to select multiple areas, click on an area to
;delete it, click outside of areas/press Backspace to reset), one or more sets of
;rectangle coordinates x1,y1,x2,y2_x1,y1,x2,y2[...], "screen_N" (captures a whole
;screen, where N is the screen number starting from 1) or a window name on
;Windows/macOS (the first matching window title will be used).
;screen_capture_area = screen_1
;screen_capture_area = 509,1107,1232,1234_519,779,1151,904
;screen_capture_area = OBS
;screen_capture_area =
;If capturing with screen capture, subsection of the selected window. Can be
;either empty (automatic selector, hold CTRL/cmd to select multiple areas, click
;on an area to delete it, click outside of areas/press Backspace to reset), one
;or more sets of rectangle coordinates x1,y1,x2,y2_x1,y1,x2,y2[...], "window" to
;use the whole window.
;screen_capture_window_area = 509,1107,1232,1234_519,779,1151,904
;screen_capture_window_area = window
;screen_capture_window_area =
;Delay (in seconds) between screenshots when reading with screen capture or obs.
;-1 to disable periodic screenshots.
;screen_capture_delay_seconds = 0
;When reading with screen capture and screen_capture_area is a window name,
;only target the window while it's active.
;screen_capture_only_active_windows = True
;When reading with screen capture or obs, delay to wait until text is stable before
;processing it. -1 waits for two OCR results to be the same. 0 to disable.
;screen_capture_frame_stabilization = -1
;When reading with screen capture or obs and frame stabilization is on, try to
;recover missed lines from unstable frames. Can lead to increased glitches.
;screen_capture_line_recovery = True
;When reading with screen capture or obs, regex to filter unwanted text from the output.
;Example value: ▶|♥|・ to remove either of those characters.
;screen_capture_regex_filter =
;When reading with screen capture on Wayland, persist the session when owocr is
;restarted. Has no effect on other platforms.
;screen_capture_wayland_persistence = False
;Display lines in the text output without spaces/separators between them.
;join_lines = False
;Display paragraphs in the text output without spaces/separators between them.
;join_paragraphs = False
;Custom line separator to use. Supports Python escape characters like \n for
;newlines.
;line_separator = " "
;Custom paragraph separator to use. Supports Python escape characters like \n for
;newlines.
;paragraph_separator = " "
;Regroup and reorder text instead of using paragraphs/order provided by the OCR
;engine.
;reorder_text = True
;Try to filter furigana lines for Japanese. Depends on reorder_text.
;furigana_filter = True
;If reorder_text is enabled, merge paragraphs that are close to each other in the
;reading direction. Can be useful if there are gaps in the middle of lines, but
;cause glitches in others.
;merge_close_paragraphs = True
;If reorder_text is enabled, support horizontal text that is center-aligned.
;support_center_aligned_text = False
;When reading with screen capture or obs, combo to wait on for taking a screenshot.
;If periodic screenshots are also enabled, any screenshot taken this way
;bypasses the filtering. Example value: <ctrl>+<shift>+s. The list of keys
;can be found here:
;https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key
;screen_capture_combo =
;When reading with screen capture, combo to wait on for invoking the
;coordinate picker to change the screen/window area. Example value:
;<ctrl>+<shift>+c. The list of keys can be found here:
;https://pynput.readthedocs.io/en/latest/keyboard.html#pynput.keyboard.Key
;coordinate_selector_combo =
;Use old macOS window screen capture API (faster, recommended for now)
;screen_capture_old_macos_api = True
;Use the wl-clipboard tools (wl-copy/wl-paste) on Wayland instead of the built-in
;clipboard code. Will use more resources and probably keep stealing focus while
;in use. Only needed on e.g. GNOME.
;wayland_use_wlclipboard = False
;Two letter language code to use for some engines and for filtering screen
;capture OCR results. Ex. "ja" for Japanese, "zh" for Chinese, "ko" for Korean,
;"ar" for Arabic, "ru" for Russian, "el" for Greek, "he" for Hebrew, "th" for
;Thai. Any other value will use Latin Extended (for most European languages and
;English).
;language = ja
;The output format for OCR results. Can be "text" (default) or "json" (to
;include coordinates).
;output_format = text
;Terminal/log window verbosity. Can be -2 (all recognized text is showed whole,
;default), -1 (only timestamps are shown), 0 (nothing is shown but errors), or
;larger than 0 to cut displayed text to that amount of characters.
;verbosity = -2
;[winrtocr]
;url = http://aaa.xxx.yyy.zzz:8000
;[oneocr]
;url = http://aaa.xxx.yyy.zzz:8001
;[azure]
;api_key = api_key_here
;endpoint = https://YOURPROJECT.cognitiveservices.azure.com/
;[mangaocr]
;pretrained_model_name_or_path = kha-white/manga-ocr-base
;force_cpu = False
;[easyocr]
;gpu = True
;[ocrspace]
;api_key = api_key_here
;engine_version = 2
;[rapidocr]
;high_accuracy_detection = False
;high_accuracy_recognition = True
;[avision]
;fast_mode = False
;language_correction = True