Skip to content

Extract distinct color-based layers from a segmented image.

Notifications You must be signed in to change notification settings

miku448/segment2layers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

segment2layers

A script to extract distinct color-based layers from a segmented image and combine them into a multi-layered TIFF file.

Installation

  1. Clone this repository:
git clone https://github.com/miku448/segment2layers.git
cd segment2layers
  1. Create a virtual environment (optional, but recommended):
python3 -m venv venv
source venv/bin/activate
  1. Install the necessary packages:
pip install -r requirements.txt

Usage

First, prepare the segmented image. You can use automatic1111's extension inpaint anything

Run the script by providing the paths to the original image and the segmented image:

python main.py

Ensure original.png and segmented.png are present in the script's directory or modify the script to point to their respective paths.

After execution, the layers will be combined into a multi-layered TIFF file named output.tif.

About

Extract distinct color-based layers from a segmented image.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages