Spaces:
Sleeping
Sleeping
pawandev
commited on
Commit
·
ab7f782
1
Parent(s):
53c569d
Added new Model and decrease the threshould value to get better result
Browse files- app/__init__.py +1 -1
- app/services/panServices/panOcr.py +1 -1
app/__init__.py
CHANGED
|
@@ -10,7 +10,7 @@ def create_app():
|
|
| 10 |
# Load model once
|
| 11 |
app.models = {
|
| 12 |
'adhaarModel': YOLO('models/aadhaarYolov8.pt'),
|
| 13 |
-
'panModel': YOLO('models/
|
| 14 |
}
|
| 15 |
|
| 16 |
return app
|
|
|
|
| 10 |
# Load model once
|
| 11 |
app.models = {
|
| 12 |
'adhaarModel': YOLO('models/aadhaarYolov8.pt'),
|
| 13 |
+
'panModel': YOLO('models/PanModel_v6.pt') # Load additional models as needed
|
| 14 |
}
|
| 15 |
|
| 16 |
return app
|
app/services/panServices/panOcr.py
CHANGED
|
@@ -6,7 +6,7 @@ from .panDataExtractor import extract_panData
|
|
| 6 |
|
| 7 |
def process_results(results, img):
|
| 8 |
label_indices = {"pan_num": 0, "name": 1, "father": 2, "dob": 3}
|
| 9 |
-
confidence_threshold = 0.
|
| 10 |
input_image_format = img.format if img.format else "PNG"
|
| 11 |
valid_formats = ["JPEG", "PNG", "BMP", "GIF", "TIFF"]
|
| 12 |
input_image_format = input_image_format if input_image_format in valid_formats else "PNG"
|
|
|
|
| 6 |
|
| 7 |
def process_results(results, img):
|
| 8 |
label_indices = {"pan_num": 0, "name": 1, "father": 2, "dob": 3}
|
| 9 |
+
confidence_threshold = 0.3
|
| 10 |
input_image_format = img.format if img.format else "PNG"
|
| 11 |
valid_formats = ["JPEG", "PNG", "BMP", "GIF", "TIFF"]
|
| 12 |
input_image_format = input_image_format if input_image_format in valid_formats else "PNG"
|