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
- add resize mask technology
- 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
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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
masksdk-1.1.1-py3-none-any.whl
(17.2 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20d9aa25f8a430f5adca29e22814f42007593d74cb58c9621001d8c4524155cb
|
|
| MD5 |
0f20aaba10421fc458e0ad737aeaaf3e
|
|
| BLAKE2b-256 |
b1722249c1f8252e60e5dee9edf7ec569e7ce17e443f042ea516a10434a51854
|