Instructions to use UTSC-DSU-Library/Tamil_OrientationYN.keras with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use UTSC-DSU-Library/Tamil_OrientationYN.keras with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://UTSC-DSU-Library/Tamil_OrientationYN.keras") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
metrics:
|
| 4 |
+
- accuracy 99.51%
|
| 5 |
+
tags:
|
| 6 |
+
- OrientationDetection
|
| 7 |
+
- TextOrientation
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
Updated CNN .keras model with input layer 256*256 RGB, and 1 output node ranging from 0 (no rotation) to 1 (180 degrees).
|
| 11 |
+
|
| 12 |
+
Its accuracy on the dataset in the link below is 99.51%, and the AUC (Area Under Curve) metric is 0.9990.
|
| 13 |
+
https://drive.google.com/file/d/1WENDw-Ggwy32KIdMlMmuF6NcO0gH3mC8/view?usp=sharing
|
| 14 |
+
|
| 15 |
+
It only recognizes 0 vs 180 degrees as there's another robust way to distinguish +- 90 from 0 and 180 degrees (another model under UTSC DSU).
|
| 16 |
+
Additionally, the dataset only contains upright images because the training program generates the 180-degrees counterparts on the fly.
|
| 17 |
+
As you will see, the model is only trained on text slices resulted from my proprietary preprocessing methods
|
| 18 |
+
(old version already on GitHub https://github.com/digitalutsc/ml_image_tool, but I will update it soon),
|
| 19 |
+
So directly feeding the page images to the model may not work well.
|
| 20 |
+
|
| 21 |
+
I used MobileNetV2 with imagenet weights as the backbone, and the accuracy proves the method to be very successful.
|
| 22 |
+
|
| 23 |
+

|