darktable-org / darktable-org/darktable
Port Fuzzy Selection from GIMP as a mask creation tool, alternative to AI
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Is your feature request related to a problem? Please describe.
Modern editing workflows in other image editors depend on precise, ideally pixel-perfect, object masks. AI models such as SAM2.1 are the primary solution proposed (see #20322), but the AI topic is very polarizing. Some people do not accept the current AI models on ethical grounds but still deserve pixel-perfect object masks, even when current parametric masks are insufficient.
Describe the solution you'd like
GIMP already has a non-AI tool for this exact purpose: Fuzzy Selection. And it performs similarly well to SAM 2.1, or in many cases (e.g., bird feathers) significantly better, with just a bit more clicking required. Hence, here is the request for porting it.
Demo in GIMP: https://discuss.pixls.us/t/for-something-different-sky-selection/56371/12
Alternatives
Continue creating non-AI masks with GIMP as an external tool, or surrender to the AI process.
Disclaimer: I am a user of AI masks with ART, but at this point, I sometimes prefer GIMP's fuzzy selection on the grounds of better quality of the resulting mask, and I would like AI opponents to have a viable alternative to AI masks anyhow.
Additional context
The AI mask merge request already contains the infrastructure for selecting a set of points that define the input for producing a mask, and that's almost exactly what Fuzzy Selection needs. Almost, because there are extra parameters associated with each point, like the "Threshold" slider and the "Select by: [Composite, Red, Green, Blue, ...]" choice box. In addition, it is often required to remove holes from the resulting mask, so an interface for doing so should also be provided. It may also be a good idea to offer an option to run the fuzzy selection tool on a slightly blurred image so that the fine texture is ignored.
@andriiryzhkov @TurboGit To be clear, this does not nullify your work on adding AI-based masking to DT. We need both ways of creating object-based masks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the AI mask merge request and its existing infrastructure for selecting input points, then compare the requested behavior with the linked GIMP Fuzzy Selection demo. The work is complete when darktable can create masks from selected points with threshold and channel options, support removing holes, and provide the requested blurred-image option if adopted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- computer-graphics, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100