Update app.py
Browse files
app.py
CHANGED
|
@@ -14,9 +14,9 @@ from PIL import Image
|
|
| 14 |
# Paths to your models
|
| 15 |
MODEL_TYPES = ["HOG & Logistic Regression","CRNN CTC","Fine Tuned TrOCR"]
|
| 16 |
|
| 17 |
-
clf_hog = joblib.load('/
|
| 18 |
|
| 19 |
-
clf_crnn = tf.keras.models.load_model('/
|
| 20 |
num_to_char = joblib.load('./decoder.joblib')
|
| 21 |
|
| 22 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
|
|
@@ -109,8 +109,8 @@ interface = gr.Interface(
|
|
| 109 |
title="Automatic License Plate Recognition",
|
| 110 |
description="Provide the file path of a license plate image, choose a model, and the system will predict the text on it. These Models are all trained on the same dataset, one model might be better compared to the other",
|
| 111 |
examples=[
|
| 112 |
-
['/
|
| 113 |
-
['/
|
| 114 |
]
|
| 115 |
)
|
| 116 |
|
|
|
|
| 14 |
# Paths to your models
|
| 15 |
MODEL_TYPES = ["HOG & Logistic Regression","CRNN CTC","Fine Tuned TrOCR"]
|
| 16 |
|
| 17 |
+
clf_hog = joblib.load('./HOG_LogRes.pkl')
|
| 18 |
|
| 19 |
+
clf_crnn = tf.keras.models.load_model('./crnn_ctc.keras')
|
| 20 |
num_to_char = joblib.load('./decoder.joblib')
|
| 21 |
|
| 22 |
processor = TrOCRProcessor.from_pretrained("microsoft/trocr-base-printed")
|
|
|
|
| 109 |
title="Automatic License Plate Recognition",
|
| 110 |
description="Provide the file path of a license plate image, choose a model, and the system will predict the text on it. These Models are all trained on the same dataset, one model might be better compared to the other",
|
| 111 |
examples=[
|
| 112 |
+
['./B8837NR.jpg', 'Fine Tuned TrOCR'],
|
| 113 |
+
['./E5105OD.jpg', 'Fine Tuned TrOCR']
|
| 114 |
]
|
| 115 |
)
|
| 116 |
|