James R. Barlow
78e8bf9cbf
Use at most 3 Tesseract threads
...
Based on a user suggestion and
tesseract-ocr/tesseract#2611 , I reviewed thread limits and found that
thread limit of 3 is still beneficial, but not 4.
> time env OMP_THREAD_LIMIT=2 tesseract omp4.png stdout >/dev/null
Warning: Invalid resolution 0 dpi. Using 70 instead.
Estimating resolution as 143
116.67user 1.67system 1:26.26elapsed 137%CPU (0avgtext+0avgdata 356752maxresident)k
2213inputs+0outputs (18major+131059minor)pagefaults 0swaps
> time env OMP_THREAD_LIMIT=3 tesseract omp4.png stdout >/dev/null
Warning: Invalid resolution 0 dpi. Using 70 instead.
Estimating resolution as 143
136.89user 1.63system 1:19.56elapsed 174%CPU (0avgtext+0avgdata 356784maxresident)k
821inputs+0outputs (0major+131080minor)pagefaults 0swaps
> time env OMP_THREAD_LIMIT=4 tesseract omp4.png stdout >/dev/null
Warning: Invalid resolution 0 dpi. Using 70 instead.
Estimating resolution as 143
161.31user 1.51system 1:18.80elapsed 206%CPU (0avgtext+0avgdata 356632maxresident)k
8477inputs+0outputs (12major+131074minor)pagefaults 0swaps
> time env OMP_THREAD_LIMIT=8 tesseract omp4.png stdout >/dev/null
Warning: Invalid resolution 0 dpi. Using 70 instead.
Estimating resolution as 143
160.30user 1.62system 1:18.01elapsed 207%CPU (0avgtext+0avgdata 356640maxresident)k
821inputs+0outputs (0major+131078minor)pagefaults 0swaps
2019-09-20 17:12:36 -07:00
James R. Barlow
eb104b405d
Avoid circular imports for __version__
2019-07-27 05:02:19 -07:00
James R. Barlow
5f00e4f9d8
Sort imports
2019-07-27 04:51:52 -07:00
James R. Barlow
187283192b
Fix reporting output file size skipped
...
Due to change to using finally for clean up
2019-06-30 15:08:10 -07:00
James R. Barlow
3331a686fa
Fix tess_threads clamped to 1
2019-06-22 00:59:33 -07:00
James R. Barlow
51ed381bfc
Rename weave -> graft
2019-06-13 01:16:56 -07:00
James R. Barlow
5ee45411c9
Decide on OMP_THREAD_LIMIT more intelligently
2019-06-13 01:02:07 -07:00
James R. Barlow
066a293462
If verbose, print stacktrace on KeyboardInterrupt
2019-06-12 13:55:43 -07:00
James R. Barlow
81fc95556c
Add progress bar for PdfInfo step
2019-06-05 03:08:04 -07:00
James R. Barlow
93f1b73579
Fix --remove-vectors which was broken in API migration
...
It got dropped during the change. This feature has also been altered so that
the final visual appearance of the file is not affected, only the OCR image.
2019-06-05 02:04:45 -07:00
James R. Barlow
df9e286e9c
Make bypassed exception clearer
2019-06-01 01:35:15 -07:00
James R. Barlow
45a361d112
Add option to use threads instead of processes
...
Mainly since they are more convenient for debugging
2019-05-31 01:56:16 -07:00
James R. Barlow
d0efdf643c
Cleanup working files when done with a particular file, rather than end of process
2019-05-23 01:25:08 -07:00
James R. Barlow
22298b31be
Fix distinction between clean and clean_final lost in API refactor
2019-05-23 01:19:58 -07:00
James R. Barlow
a139e64c67
api: short-circuit exception handler, as caller should provide their own
2019-05-22 18:30:30 -07:00
James R. Barlow
09ca1bee97
Add progress bar to optimize and add option to disable it
2019-05-22 15:31:48 -07:00
James R. Barlow
32a076c039
Refactor validation and exceptions
...
CLI now tracks check_options exceptions. API now works more like
an API, without an exception handler,
because the caller should provide one.
2019-05-20 18:01:17 -07:00
James R. Barlow
7ee0c52a57
Refactor cli into basic high level api
2019-05-19 22:34:45 -07:00
James R. Barlow
cfd67ab6aa
Fixing threading._RLock exception on Python 3.6
...
Issue was the usual business: objects that cross process boundaries need
to be picklable and Python 3.6 is more strict about this. The logger
object in particular interfered, so now we suppress it and rebuild it
in process.
2019-05-17 14:24:47 -07:00
James R. Barlow
e528adc603
pylint removal
2019-05-17 01:09:06 -07:00
James R. Barlow
0cb4e854e5
Replace ProcessPoolExecutor with multiprocessing.Pool
...
There seems to be no reasonable way to handle Ctrl-C with a
ProcessPoolExecutor. Or at least you have to press it several times to
actually kill. Pool does the job.
2019-05-17 00:48:06 -07:00
James R. Barlow
13ab23ba54
Refactor weave_layers, introduce progress bar
...
Fixes a bug in this branch where --sidecar would fail by trying to iterator
the executor futures twice.
2019-05-16 14:57:31 -07:00
James R. Barlow
50bd129d7a
logging: don't pass log object to validation
2019-05-16 01:58:48 -07:00
James R. Barlow
471cdea232
Move app specific settings a library may not want to __main__
2019-05-16 01:29:26 -07:00
James R. Barlow
f4b87915df
Fix --redo-ocr
2019-04-15 13:11:26 -07:00
mawi
c92ccc6134
fix: tests
2019-04-08 14:57:42 +02:00
mawi
6590875756
feat: add triage step
...
remove tqdm demo
2019-04-08 10:26:56 +02:00
mawi
01bbf064e0
feat: add tqdm progress bar
...
This is just a POC. Will be removed.
2019-04-05 19:52:38 +02:00
mawi
fc1c4f12f5
feat: add concurrent.futures pipeline
2019-04-05 18:48:34 +02:00
mawi
783a128bd1
feat: move to sync (none ETL) implementation - remove ruffus
2019-04-04 21:02:38 +02:00
Martin Wind
b214aa5b38
feat: move to sync (none ETL) implementation
2019-04-03 19:59:43 +02:00
Martin Wind
aa512b6181
feat: move to sync (none ETL) implementation (WIP)
2019-04-02 20:03:09 +02:00