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 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
- Clone the repository:
git clone https://github.com/tuke307/tree-disk-segmentation.git
cd tree-disk-segmentation
- 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
Built Distribution
File details
Details for the file tree_disk_segmentation-0.1.3.tar.gz
.
File metadata
- Download URL: tree_disk_segmentation-0.1.3.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36b3e73e4fff5e76c093bf8356f1c11572f35406f66ae6d4c07814db90d01c19 |
|
MD5 | d262c4c8cc0da33fef9883654388e44c |
|
BLAKE2b-256 | a2c42dbbf2d27275e28217c8a0a64ff8b7036bc3b6094d89fe9bf5336a98634b |
Provenance
The following attestation bundles were made for tree_disk_segmentation-0.1.3.tar.gz
:
Publisher:
publish_segmentation.yml
on tuke307/tree-disk-analyzer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tree_disk_segmentation-0.1.3.tar.gz
- Subject digest:
36b3e73e4fff5e76c093bf8356f1c11572f35406f66ae6d4c07814db90d01c19
- Sigstore transparency entry: 147938934
- Sigstore integration time:
- Predicate type:
File details
Details for the file tree_disk_segmentation-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: tree_disk_segmentation-0.1.3-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52f55caf1d5a7f2101e64dc10d54ec1c4bbe79bf5790d414908cf4f2a80c1e87 |
|
MD5 | 64c5fc2339389878cd2af87ee6c08a58 |
|
BLAKE2b-256 | 68cd4973d5077616c085c642b07bce4bb8f3c41d1bd430e0041a146be9da2dcd |
Provenance
The following attestation bundles were made for tree_disk_segmentation-0.1.3-py3-none-any.whl
:
Publisher:
publish_segmentation.yml
on tuke307/tree-disk-analyzer
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
tree_disk_segmentation-0.1.3-py3-none-any.whl
- Subject digest:
52f55caf1d5a7f2101e64dc10d54ec1c4bbe79bf5790d414908cf4f2a80c1e87
- Sigstore transparency entry: 147938936
- Sigstore integration time:
- Predicate type: