Lightweight instance segmentation of card IDs
Project description
microwink
Lightweight instance segmentation of card IDs.
Usage
Python
pip install microwink
from microwink import SegModel
from microwink.common import draw_mask, draw_box
from PIL import Image
seg_model = SegModel.from_path("./models/seg_model.onnx")
img = Image.open("./assets/data/us_card.png").convert("RGB")
cards = seg_model.apply(img)
for card in cards:
print(f"score={card.score}, box={card.box}")
img = draw_box(img, card.box)
img = draw_mask(img, card.mask > 0.5)
img.save("./output.png")
License
Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
microwink-0.0.4.tar.gz
(17.9 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file microwink-0.0.4.tar.gz.
File metadata
- Download URL: microwink-0.0.4.tar.gz
- Upload date:
- Size: 17.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc312da40571c61e6f70cfec2b795fca8d794f5d85c0e2b220c80dda6ba38abb
|
|
| MD5 |
091ffaa8f46a7bd77f7762cf2f370d0b
|
|
| BLAKE2b-256 |
d1f952c7c1b762e9adb2b593b8e7aec07972591cdc12c01a5760c452a33c193a
|
File details
Details for the file microwink-0.0.4-py3-none-any.whl.
File metadata
- Download URL: microwink-0.0.4-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e4bfd668b71cede2763c0a10b5f93590a04d0c693efd0a38dc999ee59bfc6c0
|
|
| MD5 |
4786fd76d5fadefe9746012548fe4402
|
|
| BLAKE2b-256 |
1bd5e89809c12daa990adcf479a37e65f64a94ded4600eb4a4dd78094b69d850
|