metadata
license: other
license_name: picsart-inc-flowdis-model-1.0
license_link: https://huggingface.co/PAIR/FlowDIS/raw/main/LICENSE
tags:
- remove background
- background removal
- dichotomous image segmentation
- flow matching
datasets:
- DIS5K
pipeline_tag: image-segmentation
library_name: flowdis
FlowDIS
FlowDIS enables highly accurate foreground segmentation, optionally guided by a text prompt. When ambiguity prevents the model from producing the desired result, the user can specify which elements to retain in the foreground.
Usage
pip install "git+ssh://git@github.com/Picsart-AI-Research/FlowDIS.git"
from PIL import Image
from flowdis import flowdis_predict, load_models
models = load_models(device="cuda")
input_img_path = "path/to/input.jpg" # Input image path
output_mask_path = "path/to/output.png" # Path to save the output mask
image = Image.open(input_img_path).convert("RGB")
mask = flowdis_predict(
image=image,
prompt="", # Text prompt
models=models,
resolution=1024,
num_inference_steps=2,
device="cuda",
)
mask.save(output_mask_path)
License
This model is licensed under the PicsArt Inc. FlowDIS Model License.
Acknowledgements
This project is built on top of FLUX.1 [schnell] and DIS5K.
BibTeX
If you use our work in your research, please cite our publication:
@article{sargsyan2026flowdis,
title={{FlowDIS: Language-Guided Dichotomous Image Segmentation with Flow Matching}},
author={Sargsyan, Andranik and Navasardyan, Shant},
journal={arXiv preprint arXiv:2605.05077},
year={2026},
eprint={2605.05077},
archivePrefix={arXiv},
url={https://arxiv.org/abs/2605.05077}
}