Skip to main content

sdk for mask

Project description

image-obfuscation-sdk

an obfuscation server contains two parts. one is inference, another is mask

this repo stands for the mask part standalone SDK

TODO

  1. add resize mask technology
  2. more lightweight API, such as numpy-op directly instead of PIL-op

How to

import io
from masksdk.call_infer_and_mask import mask_one_image, ModelName, MaskName

# conf
infer_host = 'your_ip:your_port'

# mask in local and infer in server
raw_img_file = 'path_to_your_image_file/image_file_name.jpg'
with open(raw_img_file, "rb") as img_content:
    mask_img, bbox = mask_one_image(
        infer_host=infer_host,
        image_file=io.BytesIO(img_content.read()),
        model_names=[ModelName.face_ai, ModelName.plate_ai],
        mask_name=MaskName.blur,
        degree=0.5,
        down_sampling_ratio=1,
        pixel_gap=10,
        api_version='v2',
    )

# show
mask_img.show()
print('bbox={}'.format(bbox))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

masksdk-1.1.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file masksdk-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: masksdk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.13

File hashes

Hashes for masksdk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 20d9aa25f8a430f5adca29e22814f42007593d74cb58c9621001d8c4524155cb
MD5 0f20aaba10421fc458e0ad737aeaaf3e
BLAKE2b-256 b1722249c1f8252e60e5dee9edf7ec569e7ce17e443f042ea516a10434a51854

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