Tree Disk Segmentation
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
- Create and activate virtual environment:
poetry config virtualenvs.in-project true
poetry env use python
poetry install
eval $(poetry env activate)
- Running tests:
poetry run pytest
Metadata
Release files for tree-disk-segmentation 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tree_disk_segmentation-0.2.2.tar.gz | 5.9 kB | With provenance | Details for tree_disk_segmentation-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tree_disk_segmentation-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for tree_disk_segmentation-0.2.2-py3-none-any.whl |
Total release size: 15.0 kB
Release files / tree_disk_segmentation-0.2.2.tar.gz
| Download URL | tree_disk_segmentation-0.2.2.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
679f2052e8b7fab217c7efac55a347830c9dcf8b55c7aca6d3b3066818faad77
|
|
BLAKE2b-256 checksum How to use checksums |
0f5ceb8be14c4764bca8c96909e12dcbb60872681f0b9d121b61c140e982bd96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logRelease files / tree_disk_segmentation-0.2.2-py3-none-any.whl
| Download URL | tree_disk_segmentation-0.2.2-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9ae7026e7510d5702d899dfdb3b48649a2ad591efec2f7e798fd0c8aa5a97b6
|
|
BLAKE2b-256 checksum How to use checksums |
fc81194f91955f2a85960a5470c197042a802d900f6f451c8403a43b1b8b8a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logSecurity for tree-disk-segmentation 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tree_disk_segmentation-0.2.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 26, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.