Lurker News

Comments (118) 35 threads

kuschku12 replies#
Based on the video it works amazingly well. I’ve tried finding a usable way for open source text recognition on desktop, and haven’t found anything even close to this.

Like, I've got scans of letters, machine-written, 300dpi, perfect black/white 1-bit depth, no marks or scratches, perfect quality — and OCRmyPDF (using tesseract) absolutely fails at this task, returning only bullshit. Even if I set the language correctly, or even set the wordlist to a manual transcription of the PDF.
I also tried using OCR on screenshots, with the same miserable result.
How does Apple’s Vision API do so much better at this kind of task? Is there some trick I'm missing?
Like, the images I supply are of such high quality that you can literally just split into characters and search for the nearest match in a database of latin characters, and even that would return better results than tesseract.

asadlionpk1 reply#
In my limited comparison. Apple’s API performed way better than Tessaract. You can check your images using this app or their sample xcode project for vision, I think same API works on macOS too.

I would also vouch for google’s ocr API but I opted for Apple’s for privacy reasons and as they were easier to implement.

toomuchtodo#
> but I opted for Apple’s for privacy reasons and as they were easier to implement.

Thank you for respecting user privacy and making it a first class citizen.

mendeza1 reply#
I think you have to fiddle with the internal settings of the OCR package you are using to get good results. For tesseract and pytesseract, there is a whole article on improving the quality: https://github.com/tesseract-ocr/tesseract/wiki/ImproveQuali...

My guess is Apple trained on their own massive dataset and better architectures that make their systems better than off the shelf ocr.
I am working in this area and one way I see good improvement is training an object detector to first detect words in an image, then you can pass that through tesseract/OCR software. Besides that, finetuning tesseract on data you want strong performance would be the next best alternative.
Here is a cool article from dropbox how they engineering their OCR system: https://blogs.dropbox.com/tech/2017/04/creating-a-modern-ocr...
This link below is a really cool project that showcases what building your own OCR engine would look like!
https://github.com/awslabs/handwritten-text-recognition-for-...

mendeza#
Reading all these comments about others having bad experiences with Tesseract makes me think there is a market for a robust, better alternative to Tesseract.
avian1 reply#
If it makes you feel any better, I had a similarly terrible experience with Tesseract. I spent days studying the docs and I failed to find a setup where it would produce anything useful even with the most perfect input.

I was also left with a feeling that I must have been missing some trick, because people on the web seem to be using it with good results.

scarejunba#
It requires a lot of tuning. When I first tried it out I rapidly abandoned it when I couldn't get useful stuff out of a screenshot of text I typed in.
Aardwolf1 reply#
It appears to also use Tesseract
xnyan#
The paperless project has some tweaks in the config that can get decent results out of the box. For general use with decent quality documents it will work pretty well right now versus spending hours tweaking Tesseract.
arendtio#
I use Tesseract to extract text from my scanned documents in order to be able to grep through them. What surprised me, was that the lower quality (resolution) scans had actually much better OCR results. So it seems Tesseract works best with some specific font-size-DPI combination.

This is the script I wrote for that purpose (maybe it helps): https://nopaste.xyz/?ea1e6242a659ce5c#vAMyPpajo0OIeCGQe9Wkdq...
The results aren't perfect, but good enough for my purpose.

shiredude95#
I had a similar experience working with OCR for a similar project as OP ( https://www.askgoose.com ). What we realized was tesseract's training data was significantly different to what we were trying to transcribe (screenshots of conversations). The sparseness of text leads to bad transcriptions. One workaround is to do some image processing before hand so you can break the image down into data that looks similar to the train data used for tesseract.
poxrud#
I've had success with first using imagemagick to cleanup the image, do some thresholding and then using the latest version (4.1) of tesseract. With tesseract you can also try to experiment with different --psm values for better results.
slovenlyrobot#
You get what you pay for with Tesseract, don't judge OCR performance based on it. Would highly recommend checking out FineReader if you're on a supported platform. You can feed it crumpled beer receipts and the results are still decent
bhanhfo#
Tesseract needs text on a white background to work well out of the box. For "text on images" try for example https://ocr.space/ocrapi
saurik#
I don't know if this is how it works or not, but it is worth noting that searching for text in images is a much easier problem than transcribing images, and if you do the latter as "step 1" you destroy your ability to do the former: if you search for some piece of text you want to find all images that maybe if you squint a bit could be that piece of text, which allows you to deal with cases where your recognition is forced to make a bad guess that does the moral equivalent of rebracketing symbols that is difficult to work around in a later text-only search pass. If you can at all avoid it, always avoid transforming your input information until you know your query, lest you destroy information (this is what always made Microsoft Journal so epic for me, though I should be clear that I haven't used it in 15 years so for all I know they forgot this).
bhl1 reply#
Is there a way to port Apple's Vision API to javascript for a webapp, or use their models without an Apple device like Apple Maps on Duckduckgo?
reikonomusha4 replies#
This sounds like an app I’ve wanted forever! But as with all apps I’m particularly sensitive to giving bulk access to my photos (and other data).

The app description says “images are all processed on device and nothing is sent to any server” but the app’s privacy policy talks about first- and third-party collection of potentially PII.
> The app does use third party services that may collect information used to identify you.
> I want to inform you that whenever you use my Service, in a case of an error in the app I collect data [...]. This [data] may include information such as your device Internet Protocol (“IP”) address, [...], the configuration of the app when utilizing my Service, [..], and other statistics.
Could an error log dump the strings it detected in my images and send them off to this third-party for instance?
I assume everything here exists with the best intentions, but I worry about using an app like this to scan and analyze all my images when there are a host of exceptions in the privacy policy.

milankragujevic2 replies#
The data collected is, as mentioned, used to analyze crashes. In case of an error, some information is collected, that can be explained as being justified: device unique ID, to know if an error happened on one device multiple times, IP address is collected in web server access logs, configuration of the app could mean a lot of things, i.e. resolution of the viewport, etc.

If the Privacy Policy contains no mention of sending images to the server and storing the images and/or text contents, then ... it's not happening.
edit: This comment was posted before you edited yours.

reikonomusha2 replies#
I don’t feel so concerned about images being sent to the server, but rather the information derived and collected about the images.
milankragujevic1 reply#
Again, if it's not mentioned in the Privacy Policy, a sane thing would be to assume it's not being done.

You can be paranoid, but then you shouldn't have a cell phone at all, let alone an always-connected smartphone.

Continue this thread — 1 reply

asadlionpk#
If it makes you comfortable, I am not sending text (or any other metadata for images including location, camera fingerprint etc). I plan to add basic analytics to know which views/features are being used and also crash detections.
reaperducer1 reply#
If the Privacy Policy contains no mention of sending images to the server and storing the images and/or text contents, then ... it's not happening.

A Privacy Policy is just words in most jurisdictions. Short of a Wireshark analysis, there's no way to know for sure.
I'd rather the program asked if I want to send the crash log the next time I opened it. I have several programs that do that, and I wish it was more widespread.

milankragujevic#
> A Privacy Policy is just words in most jurisdictions. Not for long. At least in EU.

Well, it's already illegal, it just takes time to prosecute enough data processors until others start being afraid of the fines and start ACTUALLY implementing GDPR.

jakobdabo1 reply#
> But as with all apps I’m particularly sensitive to giving bulk access to my photos (and other data).

I don't understand why iOS doesn't allow blocking internet access for apps. You can only disallow mobile data access, but not WiFi access.
The frustrating part is that in China they have the functionality [0], so it's there, but we are not allowed to use it for our privacy.
[0] https://old.reddit.com/r/apple/comments/69k1j8/the_chinese_i...

cmcd1 reply#
Advertising on iOS relies on internet access so toggling it off would mean no ads.
freepor2 replies#
It doesn’t need to. The OS could download ads and show them in—app and report back impressions through the OS. And, Apple doesn’t make much money from iOS ads.

Continue this thread — 2 replies

_nrv91 reply#
Try Google Photos.
asadlionpk#
That's the opposite of what the parent wants. Google photos uploads everything to their cloud.
ultimoo#
I'm in the same boat. I wish Apple gave us a way to block internet access for specific apps. Currently, there is way to block cellular data for a given app but wifi is always unrestricted.
saucow1 reply#
I've been using the Memos on iOS (https://memos.org) for searching. Memos additionally lets you copy the text and is on device.
reaperducer#
This looks very promising, and the price is reasonable.

But the web site is one page, without even an "About" section. All it has is an animation, some text, and an e-mail address. No information about the company at all. Even the whois for the domain is hidden.
For the sort of person for whom "on device" processing is important, information about the company has value.

MR4D1 reply#
Just downloaded and ran it.

Took a few minutes to go through my images, but the search was working from the very first indexed photo.
The search is fast and word recognition is freaking impressive!
Well done!

asadlionpk1 reply#
Thank you! Glad it worked fine for you :)
MR4D1 reply#
Yes!

One thought - get this plugged into the SIRI search system so people can search their photos when just doing a general search.

asadlionpk#
Great idea!

Load more comments