Skip to content

Commit

Permalink
Update default model to global-plates-mobile-vit-v2-model
Browse files Browse the repository at this point in the history
  • Loading branch information
ankandrew committed Dec 8, 2024
1 parent d30ac4b commit f8e8e71
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ from fast_alpr import ALPR
# You can also initialize the ALPR with custom plate detection and OCR models.
alpr = ALPR(
detector_model="yolo-v9-t-384-license-plate-end2end",
ocr_model="european-plates-mobile-vit-v2-model",
ocr_model="global-plates-mobile-vit-v2-model",
)

# The "assets/test_image.png" can be found in repo root dit
Expand All @@ -78,7 +78,7 @@ from fast_alpr import ALPR
# Initialize the ALPR
alpr = ALPR(
detector_model="yolo-v9-t-384-license-plate-end2end",
ocr_model="european-plates-mobile-vit-v2-model",
ocr_model="global-plates-mobile-vit-v2-model",
)

# Load the image
Expand Down
4 changes: 2 additions & 2 deletions docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from fast_alpr import ALPR
# You can also initialize the ALPR with custom plate detection and OCR models.
alpr = ALPR(
detector_model="yolo-v9-t-384-license-plate-end2end",
ocr_model="european-plates-mobile-vit-v2-model",
ocr_model="global-plates-mobile-vit-v2-model",
)

# The "assets/test_image.png" can be found in repo root dit
Expand Down Expand Up @@ -38,7 +38,7 @@ from fast_alpr import ALPR
# Initialize the ALPR
alpr = ALPR(
detector_model="yolo-v9-t-384-license-plate-end2end",
ocr_model="european-plates-mobile-vit-v2-model",
ocr_model="global-plates-mobile-vit-v2-model",
)

# Load the image
Expand Down
2 changes: 1 addition & 1 deletion fast_alpr/alpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(
detector_conf_thresh: float = 0.4,
detector_providers: Sequence[str | tuple[str, dict]] | None = None,
detector_sess_options: ort.SessionOptions = None,
ocr_model: OcrModel | None = "european-plates-mobile-vit-v2-model",
ocr_model: OcrModel | None = "global-plates-mobile-vit-v2-model",
ocr_device: Literal["cuda", "cpu", "auto"] = "auto",
ocr_providers: Sequence[str | tuple[str, dict]] | None = None,
ocr_sess_options: ort.SessionOptions | None = None,
Expand Down
2 changes: 1 addition & 1 deletion test/test_alpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_default_alpr(img_path: Path, expected_plates: set[str]) -> None:
im = cv2.imread(str(img_path))
alpr = ALPR(
detector_model="yolo-v9-t-384-license-plate-end2end",
ocr_model="european-plates-mobile-vit-v2-model",
ocr_model="global-plates-mobile-vit-v2-model",
)
actual_result = alpr.predict(im)
actual_plates = {x.ocr.text for x in actual_result if x.ocr is not None}
Expand Down

0 comments on commit f8e8e71

Please sign in to comment.