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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c3280b040b5de06613210737f12437c5b86e4d33bffa78af5f97cd30073981
|
|
| MD5 |
31a3b81586b17ecef57466fe1a1844b1
|
|
| BLAKE2b-256 |
bc296df8ac61dfde29da609beeb436e65c4da33ee6584000fe51a14c565091d1
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58a48034b87617b2479f159baf2c6f53c6a4edf3156899ebcbe7735e757750e2
|
|
| MD5 |
b4411bd792be9a56546d61e40f7b3f78
|
|
| BLAKE2b-256 |
1492a76336454e61939899ca2b172167aa761f7ba6a5def7b8cd85a7e1f304d9
|