You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The confusion matrix provides more insight than a single accuracy number. Each row corresponds to the true class, and each column corresponds to the predicted class. A strong diagonal indicates correct classification. In this output, blank cells (class 0) are almost always recognized correctly, while the remaining errors occur primarily between visually similar printed digits such as 6, 8, and 9.
245
245
246
246
This behavior is expected and indicates that the model has learned meaningful digit features. The remaining confusions are rare and can be addressed later through targeted augmentation or higher-resolution crops if needed.
247
247
248
248
## Summary
249
-
With inference validated and error modes understood, the digit recognizer is now ready to be embedded into the full Sudoku image-processing pipeline, where OpenCV will be used to detect the grid, rectify perspective, segment cells, and run batched ONNX inference to reconstruct and solve complete puzzles.
249
+
With inference validated and error modes understood, the digit recognizer is now ready to be embedded into the full Sudoku image-processing pipeline, where OpenCV will be used to detect the grid, rectify perspective, segment cells, and run batched ONNX inference to reconstruct and solve complete puzzles.
Copy file name to clipboardExpand all lines: content/learning-paths/mobile-graphics-and-gaming/onnx/08_android.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ We start by creating a new Android project using Android Studio. This project wi
27
27
1. Create a new project:
28
28
* Open Android Studio and click New Project.
29
29
* In the Templates screen, select Phone and Tablet, then choose Empty Views Activity.
30
-

30
+

31
31
32
32
This template creates a minimal Android application without additional UI components, which is ideal for a focused, step-by-step integration.
33
33
@@ -41,7 +41,7 @@ This template creates a minimal Android application without additional UI compon
41
41
* Minimum SDK: API 24 (Android 7.0 – Nougat). This provides wide device coverage while remaining compatible with ONNX Runtime and OpenCV.
42
42
* Build configuration language: Kotlin DSL (build.gradle.kts). We use the Kotlin DSL for Gradle, which is now the recommended option.
43
43
44
-

44
+

45
45
46
46
* After confirming these settings, click Finish. Android Studio will create the project and generate a basic MainActivity along with the necessary Gradle files.
47
47
@@ -201,7 +201,7 @@ Because the image area is scrollable, the layout remains usable even on smaller
201
201
202
202
When rendered, this produces a clear, vertically structured interface with a fixed control panel at the top and large input/output images underneath, as shown in the figure below.
203
203
204
-

204
+

205
205
206
206
At this stage, the UI is intentionally minimal. In the next step, we will connect this view to the application logic in MainActivity, load a sample Sudoku bitmap, and wire up the Load image and Solve buttons to the ONNX-based processing pipeline.
207
207
@@ -1035,8 +1035,8 @@ To test the app:
1035
1035
1036
1036
The figures below show two representative test cases. In each example, the upper image corresponds to the original Sudoku puzzle, while the lower image shows the same puzzle with the missing digits filled in and overlaid in green. This visual comparison confirms that grid detection, digit recognition, solving, and rendering are all functioning correctly on-device.
1037
1037
1038
-

1039
-

1038
+

1039
+

1040
1040
1041
1041
These tests demonstrate that the application is robust to perspective distortion and partial digit placement, and that the model performs reliably when deployed via ONNX Runtime on Android.
1042
1042
@@ -1056,4 +1056,4 @@ This concludes the learning path and provides a solid foundation for building, o
1056
1056
## Companion code
1057
1057
You can find the companion code in these repositories:
0 commit comments