Skip to main content

Crops or labels lesion(s) shown in an image.

Project description

Lesion Processor crops, labels, and/or isolates lesions in a given image or a set of images.

lp_overview

Installation

pip install lesionprocessor

Usage

import lesionprocessor as lp

img_path = 'data/raw/lesion1.jpg'
crop_dir = 'data/cropped'
label_dir = 'data/labeled'
isolate_dir = 'data/isolated'
unprocessed_dir = 'data/unprocessed' # optional, will default to 'unprocessed' directory

# Crop
lp.crop(img_path, crop_dir, unprocessed_dir) # option 1
lp.process(img_path, unprocessed_dir, crop_dir=crop_dir) # option 2

# Label
lp.label(img_path, label_dir, unprocessed_dir) # option 1
lp.process(img_path, unprocessed_dir, label_dir=label_dir) # option 2

# Isolate
lp.isolate(img_path, isolate_dir, unprocessed_dir) # option 1
lp.process(img_path, unprocessed_dir, isolate_dir=isolate_dir) # option 2

# Crop + label + isolate (partiton into given out directories)
lp.process(img_path, unprocessed_dir, crop_dir=crop_dir, label_dir=label_dir, isolate_dir=isolate_dir)

How It Works

lp_overview

Sample Results

Using the crop technique for standardization:

lp_overview

Additional Features

  • Concurrently process multiple images

  • Adjustable crop padding size

  • Adjustable label color

  • Adjustable label line thickness

  • Adjustable number of contours to target

  • Adjustable size of kernels for morphological transformations

  • In Progress
    • Additional thresholding methods

    • Adjustable padding for isolation process

License

Apache License 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

lesionprocessor-0.1.0.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

lesionprocessor-0.1.0-py2-none-any.whl (8.2 kB view hashes)

Uploaded Python 2

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