Skip to main content

Lightweight instance segmentation of card IDs

Project description

microwink

github ci

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("./input.png").convert("RGB")
cards = seg_model.apply(img)

for card in cards:
    print(f"score={card.score}, box={card.box}")
    img = draw_mask(img, card.mask > 0.5)
    img = draw_box(img, card.box)
img.save("./output.png")

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.2.tar.gz (15.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microwink-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file microwink-0.0.2.tar.gz.

File metadata

  • Download URL: microwink-0.0.2.tar.gz
  • Upload date:
  • Size: 15.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for microwink-0.0.2.tar.gz
Algorithm Hash digest
SHA256 47ee76fc6d2060d65fdfc0dfa5a4bf777fe69fae189595554152a458e6af2572
MD5 798d82558c02625fc3d3cdf2d040256b
BLAKE2b-256 61a1a0c33da7ce0d534970df8bcb83cc56a39e0fcbf9c5bafffc9e0699ec14ec

See more details on using hashes here.

File details

Details for the file microwink-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: microwink-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.8

File hashes

Hashes for microwink-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 019aa8e35b636637feb2be1ec959e349c3e4d5a9b36cd85879a9b9ecf18d43d9
MD5 87e2434a18f0c43c27025be0ef258907
BLAKE2b-256 c4f2fbe50f7ae6323cd7a9d342b361fd75bf5de23363e062a844233fbd27f003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page