A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/naptha/tesseract.js/issues/993 below:

Version 6 Changes · Issue #993 · naptha/tesseract.js · GitHub

Summary

Version 6 includes important under-the-hood improvements, along with a couple breaking changes.

Major Improvements
  1. Fixed memory leaks ( Fix memory leaks #977)
Minor Improvements
  1. Reduced runtime and memory usage for most users by updating default formats ( Disable non-text output formats by default #916).
  2. Fixed compatibility with Electron main process ( createWorker throws exception with option.langPath set in electron #925)
  3. Fixed bug where user-provided parameters were overwritten by defaults ( Parameters set using createWorker config argument overwritten by default arguments #975).
Breaking Changes
  1. All outputs formats other than text are now disabled by default.
  2. The JavaScript object output format (blocks) was tweaked.
  3. Various functions and options marked as depreciated previously have been removed.
    1. This includes worker.initialize and worker.loadLanguage, along with several depreciated options from v2.
Discussion Note: Refreshing Workers

The memory leak present in previous versions forced users running Tesseract.js on a server to periodically create fresh workers. Even though this should no longer be necessary to avoid a memory-related crash, server users should still occasionally create new workers.

This is because Tesseract workers "learn" over time by default. While this learning generally improves results, it assumes that (1) previous results are generally correct and (2) the image that is being recognized closely resembles previous images. As a result, if the same worker is used with hundreds of different documents from different users, it is common for Tesseract to "learn" something incorrect or inapplicable, making results worse than had a fresh worker be used.

Why were non-text output formats disabled by default?

Previous versions of Tesseract.js exported results to 4 different formats by default. After analyzing performance, we found that the unnecessary formats were routinely adding 0.25-0.50s per page to runtime when recognizing documents, in addition to increasing memory usage. Therefore, requiring users to manually specify any non-text format(s) they need should result in non-trivial performance gains.

Why was the JavaScript object output (blocks) changed?

While there are several reasons why minor changes were made to this format, the primary goal was fixing memory leaks present in the previous implementation. The new version is free of leaks, runs faster, and should be easier to maintain. Note: if any blocks output property that you rely on was cut in this release, please leave a comment and we can consider adding it back.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4