Pre-trained image models using ONNX for fast, out-of-the-box inference.
Project description
Open Image Models
Introduction
We offer ready-to-use models for a range of computer vision tasks like detection, classification, and more. With ONNX support, you get fast and accurate results right out of the box.
Easily integrate these models into your apps for real-time processing—ideal for edge devices, cloud setups, or production environments. In one line of code, you can have powerful model inference running!
Features
- 🚀 Pre-trained Models: Models are ready for immediate use, no additional training required.
- 🌟 ONNX Format: Cross-platform support for fast inference on both CPU and GPU environments.
- ⚡ High Performance: Optimized for both speed and accuracy, ensuring efficient real-time applications.
- 📏 Variety of Image Sizes: Models available with different input sizes, allowing flexibility based on the task's performance and speed requirements.
- 💻 Simple API: Achieve license plate detection with just one line of code, enabling rapid integration and deployment.
Available Models
Object Detection
Plate Detection
Model | Image Size | Precision (P) | Recall (R) | mAP50 | mAP50-95 | Speed (ms) |
---|---|---|---|---|---|---|
yolov9-t | 640 | 0.955 | 0.91 | 0.959 | 0.75 | XXX |
yolov9-t | 512 | 0.948 | 0.901 | 0.95 | 0.718 | XXX |
yolov9-t | 384 | 0.943 | 0.863 | 0.921 | 0.688 | XXX |
yolov9-t | 256 | 0.937 | 0.797 | 0.858 | 0.606 | XXX |
[1] Inference on Mac M1 chip using CPUExecutionProvider. Utilizing CoreMLExecutionProvider accelerates speed by 5x.
Usage
import cv2
from rich import print
from open_image_models import LicensePlateDetector
# Initialize the License Plate Detector with the pre-trained YOLOv9 model
lp_detector = LicensePlateDetector(detection_model="yolo-v9-t-384-license-plate-end2end")
# Load an image
image_path = "path/to/license_plate_image.jpg"
image = cv2.imread(image_path)
# Perform license plate detection
detections = lp_detector.predict(image)
print(detections)
# Benchmark the model performance
lp_detector.show_benchmark(num_runs=1000)
# Display predictions on the image
annotated_image = lp_detector.display_predictions(image)
# Show the annotated image
cv2.imshow("Annotated Image", annotated_image)
cv2.waitKey(0)
cv2.destroyAllWindows()
Installation
To install open-image-models via pip, use the following command:
pip install open-image-models
Contributing
Contributions to the repo are greatly appreciated. Whether it's bug fixes, feature enhancements, or new models, your contributions are warmly welcomed.
To start contributing or to begin development, you can follow these steps:
- Clone repo
git clone https://github.com/ankandrew/open-image-models.git
- Install all dependencies using Poetry:
poetry install --all-extras
- To ensure your changes pass linting and tests before submitting a PR:
make checks
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file open_image_models-0.1.0.tar.gz
.
File metadata
- Download URL: open_image_models-0.1.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f4175dba4c141f3d673d662085df6b0559978b1de4591289f62cf0b2a2c2c84 |
|
MD5 | 97cbcb9d0a4dee5b2f0063b95ae97912 |
|
BLAKE2b-256 | ddea86de2be094bd83473f2a045962e4d2365a88a0fed65ac73e754edb5a7a5b |
File details
Details for the file open_image_models-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: open_image_models-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47c2c17abb2f9ec9d757fcf276e1baf973e64094fb3b9394bc2dc94bc2fb2ee5 |
|
MD5 | 5c26374c95107acc1ef543072b056de1 |
|
BLAKE2b-256 | 67cefc627e4b1379648e977f662ffd70acf3374ffcb986a244070ff85924792f |