Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-disk-segmentation

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-disk-segmentation

A package for tree disk segmentation in images

  • 0.1.3
  • PyPI
  • Socket score

Maintainers
1

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 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

ArgumentTypeRequiredDefaultDescription
--input_imagestrYes-Path to input image
--output_dirstrNo./outputOutput directory path
--model_pathstrNo./models/u2net.pthPath to the pre-trained model weights
--debugflagNoFalseEnable debug mode
--save_resultsflagNoFalseSave intermediate images, labelme and config file

Development

Setting up Development Environment

  1. Clone the repository:
git clone https://github.com/tuke307/tree-disk-segmentation.git
cd tree-disk-segmentation
  1. Create and activate virtual environment:
poetry install
poetry shell

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc