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

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

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

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

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

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