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 segmentation
(
    result_image,   # Image with detected tree disks
    masks,          # List of masks for each detected tree disk
) = treedisksegmentation.run()

Command Line Interface (CLI)

Basic usage:

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

Save intermediate results:

tree-disk-segmentation --input_image ./input/baumscheibe.jpg --output_dir ./output --model_path ./models/yolo11s-seg-tree.pt --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/yolo11s-seg-tree.pt 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. Create and activate virtual environment:
poetry config virtualenvs.in-project true
poetry env use python
poetry install
eval $(poetry env activate)
  1. Running tests:
poetry run pytest

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tree_disk_segmentation-0.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tree_disk_segmentation-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tree_disk_segmentation-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4b77d2b4b11bd0cb5171cb86b835578c885266a6ec9b43a109c80cc85a362a94
MD5 faedec1a785b00feb1e4e8f840e84c1a
BLAKE2b-256 6b5720632eeed42c02a3e16a802cb6cac0abcb26b4b5384c09bc34e636f1c326

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for tree_disk_segmentation-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e405b8d9e2746b00cadb67586e2fb8631426dbca0fe0ad6380662b37c25b6abd
MD5 f14919000c041f568b75271c10800a3d
BLAKE2b-256 6980c9012031faef53e5a5b718be3320634a2fa5a0c341c28802b9e01979b05d

See more details on using hashes here.

Provenance

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

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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