Skip to main content

No project description provided

Project description

Skin Segmentation

An easy to use and packaged tool for skin segmentation

pypi version

Sample Results

skin drawio

Installation

pip install 

Usage

import cv2
from skinsegmenter import SkinDetection
from PIL import Image

# option #1
input_ = "path/to/img.png"
input_ = Image.open(input_)

# option #2
input_ = "path/to/img.png"
input_ = cv2.imread(input_)

# option #3
input_ = "path/to/img.png"

# Initialization
skinsegmenter = SkinDetection()

# Inference
res = skinsegmenter.segment(input_)


# Result
for index, mask in enumerate(res["instance_masks"]):
    cv2.imwrite(f"instance_mask__{index}.png", mask)

cv2.imwrite("integrated_mask.png", res["integrated_mask"])
cv2.imwrite("visualized_image.png", res["visualized_image"])

Project details


Release history Release notifications | RSS feed

This version

1.2

Download files

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

Source Distribution

skinsegmenter-1.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

skinsegmenter-1.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

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