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

Project details


Release history Release notifications

Download files

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

Files for lesionprocessor, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size lesionprocessor-0.1.0-py2-none-any.whl (8.2 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size lesionprocessor-0.1.0.tar.gz (10.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page