Skip to main content

A PyTorch tool kit for estimating the content area in endoscopic footage.

Project description

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.

Build Status

Example GIF

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%

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

File details

Details for the file torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for torchcontentarea-0.4.0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4df83b0d0893abc840b8a350aa0f0fce2b2777fc89806895aa2ab5e33955fc7c
MD5 cb9c8ffb5a4a22a52300fb578a4e7a10
BLAKE2b-256 1d7035b09412e63d78b9fefb9b2c6687870b103e8fcca0678a1d5633c55eb0c5

See more details on using hashes here.

File details

Details for the file torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for torchcontentarea-0.4.0-cp38-cp38-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 442822b904d87ca007ad4fb06cac0fe6dae89a2453104ec9b0553586cbe3b51e
MD5 bb294367adf9ad11526b0f6bb10bbf2d
BLAKE2b-256 c0d6abf3a673b671500a9f96af49cc08e6c27d98fc91031d0070283b8bef7a28

See more details on using hashes here.

File details

Details for the file torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for torchcontentarea-0.4.0-cp37-cp37m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2edecb64d3a2c31d9c3f0c12cdfee72d225142f36c64c5d4a84f5badc29b4fca
MD5 50a22f58ecebbf960c1543d2ff4d2988
BLAKE2b-256 bed0d4dd291f2e6c911591ec9acc57bc6b5c060af4d32a806f9a96975d23eebf

See more details on using hashes here.

File details

Details for the file torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for torchcontentarea-0.4.0-cp36-cp36m-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 1a585f1fc7bd2922b91083d63c95a5b1ec3836d8fff5378bc8cb7a388632ad3f
MD5 a7dedb19ef4fe93ef1c25354382cb6dd
BLAKE2b-256 873693ed35000812004c4ebce8004c808e16a4b489382ebfd29dde02ec478680

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page