Skip to main content

A package for tree disk segmentation in images

Project description

Tree Disk Segmentation

PyPI - Version

A Python package for analyzing tree rings in cross-sectional images.

Installation

pip install tree-disk-segmentation

Usage

Python API

import treedisksegmentation

# Configure the analyzer
treedisksegmentation.configure(
    input_image="input/tree-disk4.png",
    save_results=True,
)

# Run the analysis
(
    img_in,          # Original input image
    img_pre,         # Preprocessed image
    devernay_edges,  # Detected edges
    devernay_curves_f,  # Filtered curves
    devernay_curves_s,  # Smoothed curves
    devernay_curves_c,  # Connected curves
    devernay_curves_p,  # Final processed curves
) = treedisksegmentation.run()

Command Line Interface (CLI)

Basic usage:

tree-disk-segmentation --input_image ./input/baumscheibe.jpg --output_dir ./output/output.jpg

Save intermediate results:

tree-disk-segmentation --input_image ./input/baumscheibe.jpg --output_dir ./output/output.jpg --model_path ./models/u2net.pth --save_results

CLI Arguments

Argument Type Required Default Description
--input_image str Yes - Path to input image
--output_dir str No ./output Output directory path
--model_path str No ./models/u2net.pth Path to the pre-trained model weights
--debug flag No False Enable debug mode
--save_results flag No False Save intermediate images, labelme and config file

Development

Setting up Development Environment

  1. Clone the repository:
git clone https://github.com/tuke307/tree-disk-segmentation.git
cd tree-disk-segmentation
  1. Create and activate virtual environment:
poetry install
poetry shell

Project details


Download files

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

Source Distribution

tree_disk_segmentation-0.1.3.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

tree_disk_segmentation-0.1.3-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file tree_disk_segmentation-0.1.3.tar.gz.

File metadata

File hashes

Hashes for tree_disk_segmentation-0.1.3.tar.gz
Algorithm Hash digest
SHA256 36b3e73e4fff5e76c093bf8356f1c11572f35406f66ae6d4c07814db90d01c19
MD5 d262c4c8cc0da33fef9883654388e44c
BLAKE2b-256 a2c42dbbf2d27275e28217c8a0a64ff8b7036bc3b6094d89fe9bf5336a98634b

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_disk_segmentation-0.1.3.tar.gz:

Publisher: publish_segmentation.yml on tuke307/tree-disk-analyzer

Attestations:

File details

Details for the file tree_disk_segmentation-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for tree_disk_segmentation-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 52f55caf1d5a7f2101e64dc10d54ec1c4bbe79bf5790d414908cf4f2a80c1e87
MD5 64c5fc2339389878cd2af87ee6c08a58
BLAKE2b-256 68cd4973d5077616c085c642b07bce4bb8f3c41d1bd430e0041a146be9da2dcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_disk_segmentation-0.1.3-py3-none-any.whl:

Publisher: publish_segmentation.yml on tuke307/tree-disk-analyzer

Attestations:

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