Torch Content Area
A PyTorch tool kit for estimating the circular content area in endoscopic footage. This implementation is released alongside our publication:
- Rapid and robust endoscopic content area estimation: A lean GPU-based pipeline and curated benchmark dataset,
Charlie Budd, Luis C. Garcia-Peraza-Herrera, Martin Huber, Sebastien Ourselin, Tom Vercauteren.
[ arXiv ]
If you make use of this work, please cite the paper.
Installation
To install the latest version, simply run...
pip install torchcontentarea
Usage
from torchvision.io import read_image
from torchcontentarea import estimate_area, get_points, fit_area
# Image in NCHW format, byte/uint8 type is expected
image = read_image("my_image.png").unsqueeze(0)
# Either directly estimate area from image...
area = estimate_area(image, strip_count=16)
# ...or get the set of points and then fit the area.
points = get_points(image, strip_count=16)
area = fit_area(points, image.shape[2:4])
Performance
Performance is measured against the CholecECA subset of the Endoscopic Content Area (ECA) dataset.
Performance Results (handcrafted cpu)...
- Avg Time (Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz): 2.501ms
- Avg Error (Hausdorff Distance): 3.535
- Miss Rate (Error > 15): 2.1%
- Bad Miss Rate (Error > 25): 1.0%
Performance Results (learned cpu)...
- Avg Time (Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz): 4.662ms
- Avg Error (Hausdorff Distance): 4.388
- Miss Rate (Error > 15): 2.6%
- Bad Miss Rate (Error > 25): 1.4%
Performance Results (handcrafted cuda)...
- Avg Time (NVIDIA GeForce GTX 980 Ti): 0.171ms
- Avg Error (Hausdorff Distance): 4.289
- Miss Rate (Error > 15): 2.4%
- Bad Miss Rate (Error > 25): 1.3%
Performance Results (learned cuda)...
- Avg Time (NVIDIA GeForce GTX 980 Ti): 1.349ms
- Avg Error (Hausdorff Distance): 4.641
- Miss Rate (Error > 15): 2.6%
- Bad Miss Rate (Error > 25): 1.3%
Metadata
Release files for torchcontentarea 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details for torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details for torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details for torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.17+ x86-64 | Details for torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
Total release size: 7.9 MB
Release files / torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
4df83b0d0893abc840b8a350aa0f0fce2b2777fc89806895aa2ab5e33955fc7c
|
|
BLAKE2b-256 checksum How to use checksums |
1d7035b09412e63d78b9fefb9b2c6687870b103e8fcca0678a1d5633c55eb0c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
442822b904d87ca007ad4fb06cac0fe6dae89a2453104ec9b0553586cbe3b51e
|
|
BLAKE2b-256 checksum How to use checksums |
c0d6abf3a673b671500a9f96af49cc08e6c27d98fc91031d0070283b8bef7a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2edecb64d3a2c31d9c3f0c12cdfee72d225142f36c64c5d4a84f5badc29b4fca
|
|
BLAKE2b-256 checksum How to use checksums |
bed0d4dd291f2e6c911591ec9acc57bc6b5c060af4d32a806f9a96975d23eebf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 1.0 MB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
1a585f1fc7bd2922b91083d63c95a5b1ec3836d8fff5378bc8cb7a388632ad3f
|
|
BLAKE2b-256 checksum How to use checksums |
873693ed35000812004c4ebce8004c808e16a4b489382ebfd29dde02ec478680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for torchcontentarea 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.