Modelimage-segmentation
egeorcun

egeorcun/lucida

Lucida — general-purpose background removal with soft-alpha mastery Lucida is a BiRefNet-based background-removal / image-matting model fine-tuned to excel where most open models fail: camouflaged objects, transparent materials (glass), text & logos...

58likes
13.6kdownloads
7views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: base_model:finetune:ZhengPeng7/BiRefNet_HR

#1 Repository of the week

1
TINIX TRENDING·Topic: transparency

#1 Repository of the week

1
TINIX TRENDING·Topic: dataset:joelseytre/toonout

#1 Repository of the week

Lucida — general-purpose background removal with soft-alpha mastery

Lucida is a BiRefNet-based background-removal / image-matting model fine-tuned to excel where most open models fail: camouflaged objects, transparent materials (glass), text & logos, VFX glows, and illustrations — while staying competitive everywhere else.

On our 191-image, 8-category benchmark (MAE, lower is better) Lucida leads every model we tested — including a commercial reference — in camouflage (0.0273) and illustration (0.0095), matches the commercial reference in text/logo preservation (0.0126), and sets our best-ever transparency (0.0376) and overall (0.0304) scores. Full benchmark, gallery and training recipe: https://github.com/egeorcun/lucida — or try the live demo.

Usage

import torch
from PIL import Image
from torchvision import transforms
from transformers import AutoModelForImageSegmentation

model = AutoModelForImageSegmentation.from_pretrained(
    "egeorcun/lucida", trust_remote_code=True, dtype=torch.float32)
model.eval()

t = transforms.Compose([
    transforms.Resize((1024, 1024)),
    transforms.ToTensor(),
    transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225]),
])
img = Image.open("input.jpg").convert("RGB")
with torch.no_grad():
    preds = model(t(img).unsqueeze(0))[-1].sigmoid()
alpha = transforms.functional.resize(preds[0], img.size[::-1]).squeeze(0)
rgba = img.copy()
rgba.putalpha(Image.fromarray((alpha.numpy() * 255).astype("uint8")))
rgba.save("output.png")

For color decontamination (removing background color fringing) and the full pipeline (CLI, FastAPI service, Docker web UI), see the GitHub repository.

Base model & attribution

  • Architecture and initial weights: ZhengPeng7/BiRefNet_HR (MIT). Lucida is a fine-tune; the original copyright notice is preserved.
  • Illustration data includes ToonOut (CC-BY 4.0).
  • Some training datasets (e.g. P3M-10k, COD10K, DIS5K) are distributed for research purposes; see the GitHub README for the full dataset/license table and evaluate suitability for your use case.

License

MIT (weights and code).

Similar Projects

Discover other similar projects and AI models.

Modelimage-segmentation
briaai/RMBG-1.4

BRIA Background Removal v1.4 Model Card RMBG v1.4 is our state-of-the-art background removal model, designed to effectively separate foreground from background in a range of categories and image types. This model has been trained on a carefully sele...

♥0
208.7k
Nov 16, 2026
Modelimage-segmentation
briaai/RMBG-2.0

BRIA Background Removal v2.0 Model Card ✨ Discover FIBO on Hugging Face 💜 Bria AI&nbsp&nbsp | &nbsp&nbsp🤗 Hugging Face &nbsp&nbsp | &nbsp&nbsp 📑 Blog &nbsp&nbsp 🖥️ Demo&nbsp&nbsp| &nbsp&nbsp Github&nbsp&nbsp RMBG v2.0 is our new state-of-the-art...

♥0
376.7k
Nov 16, 2026
Modelimage-segmentation
ZhengPeng7/BiRefNet

Bilateral Reference for High-Resolution Dichotomous Image Segmentation Peng Zheng 1,4,5,6,  Dehong Gao 2,  Deng-Ping Fan 1,  Li Liu 3,  Jorma Laaksonen 4,  Wanli Ouyang 5,  Nicu Sebe 6 1 Nankai University&ens...

♥0
952.2k
Feb 4, 2026
Modelimage-segmentation
briaai/RMBG-3.0

BRIA Background Removal v3.0 Model Card 🏆 1 in background removal in our head-to-head benchmark against Photoroom, remove.bg (Canva), Ideogram, BiRefNet and RMBG-2.0, on 234 hard images at full resolution. Background removal, reimagined as image ed...

♥0
736
Nov 17, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
Modelimage-text-to-text
baidu/Unlimited-OCR

Unlimited OCR Works Welcome the Era of One-shot Long-horizon Parsing. Release - 2026/06/23 📄 Our paper is now available on arXiv(https://arxiv.org/abs/2606.23050). - 2026/06/23 🤝 Thanks to the ModelScope community for their support. Our model is n...

♥0
5.1M
Oct 14, 2026
Modelimage-segmentation
PramaLLC/BEN2

BEN2: Background Erase Network !arXiv(https://img.shields.io/badge/arXiv-2501.06230-b31b1b.svg)(https://arxiv.org/abs/2501.06230) !GitHub(https://img.shields.io/badge/GitHub-BEN2-black.svg)(https://github.com/PramaLLC/BEN2/) !Website(https://img.shi...

♥0
131.7k
Dec 31, 2025
Modeltext-generation
deepseek-ai/DeepSeek-R1

DeepSeek-R1 Paper Link👁️ 1. Introduction We introduce our first-generation reasoning models, DeepSeek-R1-Zero and DeepSeek-R1. DeepSeek-R1-Zero, a model trained via large-scale reinforcement learning (RL) without supervised fine-tuning (SFT) as a p...

♥0
1.7M
Mar 27, 2025
RepositoryPython
egeorcun/lucida

Background removal that keeps what matters: glass, camouflage, text, glow and line art. BiRefNet fine-tune, MIT.

178
Aug 5, 2026