googlesamples / googlesamples/mlkit

ML Kit Text Recognition Fails to Read Single Character Letter "B"?

Open
#596 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Kotlin
Stars
4.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

Using ML Kit Vision Quickstart demo code downloaded from GitHub for text recognition of still images. Photos are sample game menus. Text Recognition Latin module fails to recognize the single capital letter "B" as either block, line or element. Screen shots below show recognized text overlaid in black on white.

**To Reproduce**
1. Run Vision Quickstart app (either Java or Kotlin version)
2. Select StillImageActivity button from menu
3. Select still image from album
4. Select Text Recognition Latin from Object Detection spinner
5. Code displays recognized (or not) text lines on original still image using black on white overlays

** Sample emulator screen shots from Quickstart app

Does not recognize line with letter "B"

![ML Kit Text Latin Demo6](https://user-images.githubusercontent.com/119348070/205500105-eb14539f-5f22-4ae1-93c3-7fcccd016b34.png)

Correctly identifies all four single character lines A, E, C, D

![ML Kit Text Latin Demo5](https://user-images.githubusercontent.com/119348070/205500108-7b83e2fa-0eee-4c72-97b3-bfd16645c7a7.png)

Does not recognize line with single char "B "

![ML Kit Text Latin Demo4](https://user-images.githubusercontent.com/119348070/205500112-6de8dd97-72dd-4de3-a21e-060b77b50f3b.png)

![ML Kit Text Latin Demo3](https://user-images.githubusercontent.com/119348070/205500113-ebca0b34-df60-4940-9750-ffcd13841b3a.png)
![ML Kit Text Latin Demo2](https://user-images.githubusercontent.com/119348070/205500115-98b97d9e-f5a5-4af9-bbe0-1d26b5e23146.png)
![ML Kit Latin Text Demo1](https://user-images.githubusercontent.com/119348070/205500117-1c1d6c44-a1e8-4e60-842a-5786cec442eb.png)

**Expected behavior**
Text Recognition Latin feature should recognize all large block Latin letters from sample game menus. Works OK for several menus, but fails to read standalone capital letter "B" as either block, line or element. Confirmed by inspection of LOGCAT file.

**SDK Info:**
version unclear - here is list of imports from downloaded GitHub code

import com.google.mlkit.vision.text.Text
import com.google.mlkit.vision.text.TextRecognition
import com.google.mlkit.vision.text.TextRecognizer
import com.google.mlkit.vision.text.TextRecognizerOptionsInterface

**Smartphone:**
- Device/Simulator: Pixel 4 API 33
- Emulator sdk_gphone65_arm64 Android v13

**Development Environment:**
Android Studio Dolphin | 2021.3.1 Patch 1
Build #AI-213.7172.25.2113.9123335, built on September 29, 2022
Runtime version: 11.0.13+0-b1751.21-8125866 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

MacBook Pro (14-inch, 2021)
macOS 12.6

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.