Releases: xf0e/open-ocr
Releases · xf0e/open-ocr
brilliant green
What's Changed
- openAPI definitions by @xf0e in #46
- #47
- #48
- Fix unused method receiver by @deepsource-autofix in #49
- Use the recommended replacements for
io/ioutil
functions by @deepsource-autofix in #50 - Format code with gofmt and gofumpt by @deepsource-autofix in #52
- Development by @xf0e in #53
Full Changelog: v1.8.1...v1.8.2
a little big cat
who? me?
whiskey in the jar
Development (#41) * [CGL] corrected comment on CheckForAcceptRequest * [CODING] all incoming request will (even erroneous) will get and log corresponding requestID. [CODING] resource manager now additionally relies on onw size of request queues. Should avoid cases there someone places many request at once * [CODING] more error logs now contains requestID for trouble shooting * [CODING] investigating code for deadlock if multiple requests are placed at same time. do not use in prod * [DEBUGGING] further investigation of a possible deadlock in addNewRequest * [BUGFIX] further investigation of a hang bug * [CODING] /ocr-status will now return a valid JSON with status "not found" and CODE 200 instead of 404 Status code * [CGL] RequestID will now be shown in the logs instead of requestID * [BUILD] removed netgo build flag from Makefile * Makefile now builds static linked executables * [BUGFIX] further investigation of a hang bug * [BUGFIX] further investigation of a hang bug, removed mutex l * [BUGFIX] further investigation of a hang bug, removed mutex l * [BUGFIX] further investigation of a hang bug, removed mutex l * [BUGFIX] further investigation of a hang bug, removed mutex l * [BUGFIX] further investigation of a hang bug, removed mutex l * [BUGFIX] further working on fixing hang bug on many simultaneous requests * [BUGFIX] further working on fixing hang bug on many simultaneous requests * [BUGFIX] further working on fixing hang bug on many simultaneous requests * [BUGFIX] corrected detection of an invalid reply_to address * [BUGFIX] fixed a bug there a deferred request with reply_to not set was returned without of request ID, so the requester didn't know which request to ask for * [BUGFIX] fixed a bug there the deferred requests were still tracked till timeout even if client hat successful downloaded them already * [BUGFIX] fixed race conditions on request counter and res manager [TODO] fix goroutine leak at [chan send, 3 minutes] ocr_rpc_client.go:221 * [BUGFIX] fixed race conditions request counter * [CGL] fixed comments * [CODING] added todo for fixing leaking go routines * [BUGFIX] go routines are not leaking anymore. There now a bug if "deferred": true, eply_to":"" are not set. The in-flight request queue won't be cleaned up for those requests. ocr_resultorage:72 needs to be considered * [CODING] better logging upon shutdown signal * [CODING] working on proper timeout cancel * [CODING] working on proper timeout cancel * [CODING] better logging in status handler * [CODING] correct handling of goroutines with replyto not set and deferred is true * [CGL] just some CGL * [CODING] go mod tidy * [CODING] updated dependency Co-authored-by: Artem Mil <[email protected]>
The Lesser of Two Evils
Version 1.7.5.106.gc0cda3e
- TLS Support for http_client is added.
- some bug fixes
pillars of creation
comming soon
ultima thule
- This release contains mostly the CGL and a workaround to prevent memory leakage in workers.
- For tesseract engine there is a new parameter
deferred
withtrue|false
values. Sandwich engine may work too.
To test the new feature:
curl -X POST -H "Content-Type: application/json" -d '{"img_url":"http://localhost:8000/test.tif","engine":"tesseract","deferred":true}' http://localhost:8080/ocr
There will be response like this:{"text":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a","status":""}
- To check the status, issue:
curl -X POST -d '{"img_url":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a"}' http://localhost:8080/ocr-status -H "Content-Type:application/json
by utilizing the id from the open-ocr response.
Where will be response in form of{"text":"this is the text from the image","status":""}
if the response is ready or{"text":"ae5bffd5-27f9-4b7d-5a8b-ba62b0235f8a","status":"processing"}
. Otherwise there will be 500 http code for an invalid id.
less than hero
Good news, everyone!
The next version of the sandwich engine is ready. All planned features are available . Although there is a need to do some refactoring on logging and error handling. So be careful.
The art of calling the sandwich engine has changed.
- where is no need to pass -c textonly_pdf":"1" in config_vars anymore.
- sandwich engine can be asked to return a combinepdf, ocrlayeronly and txt all three as base64
- result_optimize only has effect in combination with combinedpdf.
- sandwich engine can handle TIFF and PDF on its input
The valid way to call it is now:
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"txt","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"combinedpdf","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"oclayeronly","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
Have fun!