Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current version doesn't extract text from image which previous version did #34

Open
bwagner opened this issue May 5, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@bwagner
Copy link
Contributor

bwagner commented May 5, 2024

This version:

Textinator-Installer-arm64-Apple-Silicon.dmg 21.5 MB Dec 2, 2023

was capable of extracting information from this image:

image

But the version:

Textinator-Installer-x86-64.dmg 21.6 MB 19 hours ago

is not.

Also, the new version does not have an Apple Silicon installer.

@RhetTbull
Copy link
Owner

RhetTbull commented May 5, 2024

I've been traveling and don't have access to my M1 Mac to build Apple silicon version. When I get home I'll build it and will test the image. Absolutely nothing changed in the image detection code so this must be some difference in the Rosetta layer as it sounds like you're running the x86 version on Apple Silicon.

@RhetTbull
Copy link
Owner

Also is it just this image that's a problem? Does it detect text in other images?

@RhetTbull
Copy link
Owner

Fascinating--that image causes Textinator to crash for me on both x86 and Apple silicon. Other images work fine on both platforms. I'll have to instrument the code to find out where the crash is happening. I changed nothing in the text detection code with the last release. Unfortunately due to the way mac apps work via the Python to Objective-C bridge, sometimes an internal crash on the Objective C side is ignored by the python side and it's hard to figure out where it's happening. I'll do some debugging. In the meantime I suggest you revert to the previous release.

@RhetTbull RhetTbull added the bug Something isn't working label May 6, 2024
@bwagner
Copy link
Contributor Author

bwagner commented May 6, 2024

Also is it just this image that's a problem? Does it detect text in other images?

So far, it only happened with this particular image. I believe it occurred even with only the part of the image displaying only the percentage value in parentheses. I hadn't even been aware that there was a crash. The effect was just - no text OCR'd.
Thank you!

@RhetTbull
Copy link
Owner

The "crash" doesn't cause Textinator to actually quit -- it's an exception that is handled by Objective C layer but then the code path stops running and no output is produced.

@RhetTbull
Copy link
Owner

This appears to be because the chart symbol causes an error with the text detection in the Vision subsystem resulting in text that crashes part of the code when it is displayed or used. I can write the text to a file but any attempt to manipulate it in Textinator crashes/hangs that part of the code. Nothing changed in the vision detection so not sure why this happens but I did confirm the previous version worked. Very strange.

The text detected is below and it does not resemble the actual text at all. Detecting subsets of the image without the chart icon work as expected.

7709
000T'0
(%SL'T) M E286 ttt09%

The swift app textra does appear to correctly detect the text using code very similar to Textinator's so when I have more time, I will dig deeper and see if I can replicate what textra is doing and if that fixes the issue.

@bwagner
Copy link
Contributor Author

bwagner commented May 7, 2024

Quite the conundrum... Thank you for your efforts!

@RhetTbull
Copy link
Owner

Take a look at ocrmac to see if their Vision code works on the problem images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants