In the retouch module, it is possible to create a circle, an oval, or a path. However, there is no option to create a shape using AI—specifically the same type of AI-generated shape available when using masking tools.
Has anyone already submitted a request for this feature? I would be happy to submit it myself, but I’m not sure where to do so.
I thought about it myself, but then I couldn’t come up a concrete usecase in which I would use it. Do you have an example where an AI object would be needed? Visuals would help. Thanks!
I sometimes find myself wanting this functionality. Mostly for removing complicated objects. But then I draw such a mask manually and find myself unable to find what to fill the space with. So I conclude that this is more of a “generative” territory - which is the functionality I would like to see in darktable at some point. The way I see it working would be similar to Lightroom retouching - select an object that’s to be removed, press OK to confirm its shape, then the generative AI redraws the area as it sees fit, completely removing the object from the scene.
Just about everything I retouch to remove! Whether it is a hand sticking into the pic, a plastic water bottle catching the light, the end of a violin bow, etc etc, I could just as easily ai-shape it as draw a path around it or paint it with a brush.
There is always a decision to be made: would manual drawing be so simple that waiting for the ai analysis is not worth it. I would like to have the ai tool as an option.
Do not expect to see this in the near future. Generative ai is not an acceptable option in dt at this time. Why? You would have to read back over the initial discussions where any sort of ai masking or denoising was highly controversial to a lot of people. Maybe someone better at memory and precis could could put that in a paragraph: not my skill.
There is an infill-paint model available. Again, better memory than mine is needed. I gave it a try and didn’t find that it worked well for me, so I forgot about it.
I don’t have an example of this right now, but I’m referring to complex objects where there is very little space around them to take a reference sample.
I see. Well, people have strong opinion on this kind of subject, so it’s really down to what the community decides is worth. For me, there’s no difference between 90% of your image being generated by an algorithm like a denoise and 5% of your image being generated by an algorithm such as in-fill generative AI. But to each their own
Might be slightly off topic, but it would be nice if we could rotate the source object or even resize it for better placement in the destination. An example could be replacing a section of a plant stem.
Rotate, you can already (in master, but maybe also in 5.6? I don’t remember when that was merged). Resize is harder to justify, because retouch copies the texture from source to target, and if you resized the two patches independently the scale of the texture would be off.
Where the object is close to another object. The heal tool is temperamental and touching something else can have weird results, I’d go so far as to say that it only works well in clear space.
I think it unlikely that I’d use a circle or ellipse, but now, the situation in retouch is that the only drawn shape missing from the mask set is the ai tool
The question is not whether there are cases in which one would use the AI mask. The question is whether there are cases in which the already available tools are not sufficient or a cause of friction. I use retouch extensively, and in 90% of the cases I use circles. In the remaining 10%, a polygon with 3-5 sides. Not once I needed anything more complicated than that.
Boundary issues are caused by the relatively simple algorithms, especially in the case of fill, not by the lack of AI segmentation.
Happy to change my mind if I see convincing examples. Maybe I just don’t try to retouch sufficiently difficult cases.
I’ve had lots of success retouching edges (jaw lines), but you have to use a lot of care in selecting the source.
As far as generative AI in darktable is concerned:
during the conversations about having AI in darktable that was the line that nobody thought we should cross
when we decided to include AI, the models we shipped had to meet open source standards. I’m not sure that any generative AI model can meet that standard. I haven’t checked lately to what models are considered acceptable, so that may have changed.
Replacing sections of an image, especially anything so complicated as to require an AI mask, is more in the realm of a pixel editor such as GIMP or Photoshop.
I’m not sure if this is what OP had in mind, but when I first read the title of this post, my first thought was of Google’s Magic Eraser and the “dust and scratches” feature of Photoshop etc.
For the former, AI finds potential areas for removal, either on its own or with help from the user (by drawing a rough circle around something). It’s particularly good at finding power lines and the like.
Dust and scratches simply automates the process of finding smudges, spots and other undesirables.
I don’t know how much of an appetite there is for this kind of thing. I try not to use the Retouch module much, but hiding an egregious powerline is definitely a chore to remove without ugly cloning. But the only way we would want AI to help is in the object selection, rather than generative fill.
Only reading along here opens up a complete new perspective
Thank you for the info! Since the restriction is the generative AI in darktable, I also think that there is no need for the effort of the AI masks in the retouch module.