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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 2

File details

Details for the file lesionprocessor-0.1.0.tar.gz.

File metadata

  • Download URL: lesionprocessor-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for lesionprocessor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 07c3280b040b5de06613210737f12437c5b86e4d33bffa78af5f97cd30073981
MD5 31a3b81586b17ecef57466fe1a1844b1
BLAKE2b-256 bc296df8ac61dfde29da609beeb436e65c4da33ee6584000fe51a14c565091d1

See more details on using hashes here.

File details

Details for the file lesionprocessor-0.1.0-py2-none-any.whl.

File metadata

  • Download URL: lesionprocessor-0.1.0-py2-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.15

File hashes

Hashes for lesionprocessor-0.1.0-py2-none-any.whl
Algorithm Hash digest
SHA256 58a48034b87617b2479f159baf2c6f53c6a4edf3156899ebcbe7735e757750e2
MD5 b4411bd792be9a56546d61e40f7b3f78
BLAKE2b-256 1492a76336454e61939899ca2b172167aa761f7ba6a5def7b8cd85a7e1f304d9

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