Skip to main content

This package provides seamless integration of pre-trained image segmentation models from Ilastik into Python workflows, empowering users with efficient and intuitive image segmentation capabilities for diverse applications.

Project description

LE GOURRIEREC Titouan LinkedIn Mail

EasIlastik

A package to facilitate the use of image segmentation model trained on Ilastik in Python
Explore the docs »
Report a bug · Request Feature

PyPI Version Downloads Code Style: Black License

Table of Contents
  1. About The Project 📖
  2. Getting Started
  3. Usage
  4. License
  5. Contact
  6. Acknowledgments

About The Project

This package provides seamless integration of pre-trained image segmentation models from Ilastik into Python workflows, empowering users with efficient and intuitive image segmentation capabilities for diverse applications.

(back to top)

Built With

  • Python
  • OpenCV
  • Shell Script

(back to top)

Getting Started

Prerequisites

  • Ilastik software: To train your own model for image segmentation, please download the Ilastik software tailored to your computer's operating system from: https://www.ilastik.org/download.

Train a model

  • To train your own model on Ilastik and properly adjust the different parameters, please refer to this documentation.

(back to top)

Usage

For usage examples of this package, please refer to the Example Notebook.

Process a single image

EasIlastik.run_ilastik(input_path = "path/to/your/image.jpg", # The path of the image to process
                       model_path = "path/to/your/model.ilp",
                       result_base_path = "path/to/your/output/folder/",
                       export_source = "Simple Segmentation",
                       output_format = "png")

run_ilastik_image

Process a folder of images

EasIlastik.run_ilastik(input_path = "path/to/input/folder", # The path of the folder to process
                       model_path = "path/to/your/model.ilp",
                       result_base_path = "path/to/your/output/folder/",
                       export_source = "Simple Segmentation",
                       output_format = "png")

run_ilastik_folder

Show probabilities

EasIlastik.run_ilastik(input_path = "path/to/input/image",
                       model_path = "path/to/model.ilp",
                       result_base_path = "path/to/output/folder",
                       export_source="Probabilities", # Probabilities
                       output_format="hdf5") # hdf5 format

output_path = "path/to/output/image.h5"
image = EasIlastik.color_treshold_probabilities(output_path, threshold, below_threshold_color, channel_colors)

run_ilastik_probabilities

Run with probabilities

EasIlastik.run_ilastik_probabilities(input_path = "path/to/input/folder",
                                     model_path = "path/to/model.ilp",
                                     result_base_path = "path/to/output/folder",
                                     threshold = 70, # threshold for the probabilities
                                     below_threshold_color = [255, 0, 0], # color for the pixels below the threshold (red)
                                     channel_colors = [[63, 63, 63], [127, 127, 127], ...] # colors for the different channels
                                     )

run_ilastik_probabilities

(back to top)

License

Distributed under the GNU License like the Ilastik software. See LICENSE for more information.

(back to top)

Contact

LE GOURRIEREC Titouan - titouanlegourrierec@icloud.com

Repository Link: https://github.com/titouanlegourrierec/EasIlastik
Pypi Link : https://pypi.org/project/EasIlastik/

(back to top)

Acknowledgments

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

EasIlastik-1.0.1-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file EasIlastik-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: EasIlastik-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 25.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for EasIlastik-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b00aa70359a3633b21fb8a0862099ceb096208499096d986a702c181a5c44a97
MD5 0f7d4fc60581a1ed978e06fdc61b5d49
BLAKE2b-256 2ca0b4e02133a85e4f2bd2edc30951869bb59605391e2936f5c87e7e801fbd82

See more details on using hashes here.

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