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.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for tree_disk_segmentation-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5ec4d61f1e2b4866661e4838e7bf623c425d6f00c60e38dfb525bbb77f764289
MD5 2a8307e73b73c81412bd1211bd25881d
BLAKE2b-256 049ed2da81f5f0f2acb764089e03ecf5c306e2711eab326528ff62db7fcdd704

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on tuke307/tree-disk-segmentation

Attestations:

File details

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

File metadata

File hashes

Hashes for tree_disk_segmentation-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fdefd34732649fc12be523b9ae0fed34f4f11869e7594958d9561adf0e30af7e
MD5 61be279f4610721aae17e28f1bee801f
BLAKE2b-256 e55d7b8b6e899a1925d968a3efcd2de650513104a2f9cfed2f0dd3cf2145fa28

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on tuke307/tree-disk-segmentation

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