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.2.tar.gz (5.9 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.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tree_disk_segmentation-0.2.2.tar.gz
  • Upload date:
  • Size: 5.9 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.2.tar.gz
Algorithm Hash digest
SHA256 679f2052e8b7fab217c7efac55a347830c9dcf8b55c7aca6d3b3066818faad77
MD5 9eb429efa28856e3c6fce50c7f51d5c9
BLAKE2b-256 0f5ceb8be14c4764bca8c96909e12dcbb60872681f0b9d121b61c140e982bd96

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_disk_segmentation-0.2.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for tree_disk_segmentation-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a9ae7026e7510d5702d899dfdb3b48649a2ad591efec2f7e798fd0c8aa5a97b6
MD5 42bd1b6aeefba37e10830702552bfe67
BLAKE2b-256 fc81194f91955f2a85960a5470c197042a802d900f6f451c8403a43b1b8b8a14

See more details on using hashes here.

Provenance

The following attestation bundles were made for tree_disk_segmentation-0.2.2-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