A package for tree disk segmentation in images
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b77d2b4b11bd0cb5171cb86b835578c885266a6ec9b43a109c80cc85a362a94
|
|
| MD5 |
faedec1a785b00feb1e4e8f840e84c1a
|
|
| BLAKE2b-256 |
6b5720632eeed42c02a3e16a802cb6cac0abcb26b4b5384c09bc34e636f1c326
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_disk_segmentation-0.2.0.tar.gz -
Subject digest:
4b77d2b4b11bd0cb5171cb86b835578c885266a6ec9b43a109c80cc85a362a94 - Sigstore transparency entry: 174187226
- Sigstore integration time:
-
Permalink:
tuke307/tree-disk-analyzer@7cacd324fa1a94e58394d0a26a24991dc00402bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tuke307
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_segmentation.yml@7cacd324fa1a94e58394d0a26a24991dc00402bc -
Trigger Event:
push
-
Statement type:
File details
Details for the file tree_disk_segmentation-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tree_disk_segmentation-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e405b8d9e2746b00cadb67586e2fb8631426dbca0fe0ad6380662b37c25b6abd
|
|
| MD5 |
f14919000c041f568b75271c10800a3d
|
|
| BLAKE2b-256 |
6980c9012031faef53e5a5b718be3320634a2fa5a0c341c28802b9e01979b05d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tree_disk_segmentation-0.2.0-py3-none-any.whl -
Subject digest:
e405b8d9e2746b00cadb67586e2fb8631426dbca0fe0ad6380662b37c25b6abd - Sigstore transparency entry: 174187228
- Sigstore integration time:
-
Permalink:
tuke307/tree-disk-analyzer@7cacd324fa1a94e58394d0a26a24991dc00402bc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/tuke307
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_segmentation.yml@7cacd324fa1a94e58394d0a26a24991dc00402bc -
Trigger Event:
push
-
Statement type: