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.
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
Sample Results
Using the crop technique for standardization:
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
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 Distribution
lesionprocessor-0.1.0.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for lesionprocessor-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58a48034b87617b2479f159baf2c6f53c6a4edf3156899ebcbe7735e757750e2 |
|
MD5 | b4411bd792be9a56546d61e40f7b3f78 |
|
BLAKE2b-256 | 1492a76336454e61939899ca2b172167aa761f7ba6a5def7b8cd85a7e1f304d9 |