I don’t want to sound condescending. But you talk a lot about Photoshop. If that provides the better tools for you well use that and stop comparing, it is not really helping.
@anry is doing a great job, this is after all an open source project and @anry is not getting paid to do this and I think he is pouring a lot of free time in this. So thank you so much!
I am also a bit puzzled that darktable takes a vector approach for masking a raster file. I do get it for the circle, elipse and the drawn mask, I get it, these tools are great.
But I avoid the brush mask at all costs, imho it is one of the most clunky brush tools I have ever worked with. And once you created it… it is extremely hard to adjust.
I resisted using the brush tool for many years in DT because it didn’t feel as nice as the brush in LR. However, I eventually got won over to using the brush, but I set the opacity to a low value like 10-30% and build up the strokes over multiple instances. It can be nice for dodging and burning. So I am a recent convert to the brush.
Yes Terry … we all our preferences and have the freedom to choose , which one fits best into budget or different software developers .
I wish i would have a better technical understanding of what is going on behind the software … but i am just a " dumb " photographer and user of software . Always hoping clever folks develop tools that i can use to make my photos shine …
No worries … but luckily i do not need somebody else , to tell me what i have to use as my preferred tools . And i will not stop comparing different tools , for sure not if somebody else is trying to tell me that .
I think it is ok to share thoughts about weakness of tools , having wishes how to maybe make the tools better if technically possible from developers perspective .
And this is the place … where all users can chime in and share their individual thoughts . If it is helping … i think yes , as the developers might get an idea what can be made better . But this is just again down to personal taste .
Said many times , how cool it is to see certain tools coming to DT and the various devs doing a great job .
I opened PR with some improvements in object mask post-processing:
Honestly speaking, it is just a removal of two post-processing steps which were added to improve the AI mask quality. But after testing and feedback in this topic I learned that it makes things worse.
And just a kind reminder that mask can improved just by adding multiple clicks on the object you want to select.
Unfortunately that does not work for me. If the first click masks only part of a subject, when I try to click on the unmasked part sometimes I manage to shift the mask a bit, but I do not get the “add this area to the mask” result that I would expect.
That would depend on on object visual structure. What you described is a situation when model treats new clicks as completely different object. However, if you selecting, for example, a person and you click on the head first, it typically works fine when clicking on other body part to extend to a full-body mask.
But my advise was about different thing: try to make additional clicks on already selected area, maybe closer to the parts where edge is not perfect. In many cases it improves mask.
I find it a bit hit or miss. eg, when selecting a person, the mask may have got it amost right, but followed the line of a dress leaving a bare shoulder unmasked. And sometimes the extr click works, sometimes it doesn’t. Sometimes something somewhere else changes!
But it is a great work, in progress, and I’m sure you will improve and progress it. Probably many times into the future.
Perfect by tomorrow is something I am not expecting and certainly not asking for
It’s fine to look a needed mask and think, I can do with with a drawn shape and feathering very easily, and do that. By trying the AI mask, it adds experience as to which “path” to choose.
I think given the contraints of the vector model in DT it will always be difficult to get certain masks esp those with hair and or other details…There will be times when hard nodes or a mix would be better. There will be times when less nodes could acutally be better. If you have the contrast and feathering set moving a segment between nodes and leveraging the edge aware settings will give you a better mask… I have not refined things perfectly here but this is a quick path drawn initially around the egret from the egret playraw and then a couple of segments were dragged…look where the path of the mask is and yet look how it follows the feathers in the mask…if you had 100 nodes in that segement it would still likely not be as good… I find using a rough mask with less nodes is often just as good and you can then add extra nodes to key spots as needed… I think there was an iteration of this module with a slider for the number of nodes but maybe I am not remembering correctly… THere are cases where less nodes could be easier to get a better mask with…
It’s not only constrain of mask vector model in DT, segmentation models used in AI object mask just don’t produce detect that fine details. Some models might handle that slightly better, some worse, but never perfect.
Fine details around mask edge can be achieved by leveraging matting algorithm. And that fits well into DT architecture:
Segmentation model in masking tool (AI object mask) detects object with as hard edges.
Mask refinement in mask blending improves edge fine details in a parametric way using matting algorithms.
For mask refinement we currently have feathering, which might be not an ideal tool for this task, but still helpful. I am working on matting mask refinement, but can not promise anything yet.
I agree with you…and what I was trying to explain about having too many nodes in certain cases…likely badly … might show better here… see video…
When you have so many nodes this sort of adjustment is hard to make but with less nodes you can using the segments move them and achieve a pretty accurated masking…if you need then to add a few nodes here or there you can and then move the smaller segment…you can also bend the segments with the bezier adjustment and help the feathering to follow the edges…
That gets a bit harder to do when there are many many nodes…
Honestly though I am not that picky and very hard masks often don’t blend or fit in well either… if you make extreme adjustements inside or outside the mask it will be obvious and like also lead to artifacts…
I think what you have created is a nice tool for a quick mask that will work in many cases and within the constraints of DT allow you to expand the use of the mask in the mask manager and with the parametric masks which is not otherwise possible with raster options…
That’s a nice demo showing how well you can refine masks in Darktable, even people I know who are die hard Ps adherents have acknowledged how powerful the masking can be in this program. It is certainly well ahead of its time.
I get the point that automated masking ought to be spot on with the first click, but my experience with some other programs (I have no real runtime with Ps) is that their AI masks produce so many artifacts that require refinement that they’re not really worth the bother.
I think this new feature compliments DT very well and I’m excited to see it rolling out. Thank you @anry !
@anry I really appreciate the work you are doing with this and I can only see it getting better and better as time goes on. Any improvements to mask refinement will be a great addition to DT.
I’m currently running Windows 11 latest build. However, I get an incompatible with this software error when attempting to install the Windows -woa64 version of the nightly builds.
The -win64 builds are running smoothly.
After reading this thread about AI masking I think vector masking can be improved. At the moment resizing the mask makes the mask bigger or smaller with regard to the centroid of the mask. I think that offsetting the path could give better results. (An offset of the shape is already calculated for feathering.)
I don’t understand the technical difficulties of achieving this but I agree that an offset should be used to make the mask bigger or smaller rather than the current centroid based method.
The latest nightly build (starting from 20260514) includes updates to the AI object mask aimed at improving the quality of mask boundary detection.
This is achieved by a revised post-processing step that runs automatically after detection on each click. The detection model itself is unchanged – this is purely a post-processing improvement.
A new refine mask boundary checkbox is available in the mask properties (see screenshot). It enables an additional refinement step that snaps the boundary even closer to fine image structure. On by default; it adds a few hundred ms per click, so you can turn it off if it feels too slow.
IMPORTANT – if you’ve been testing earlier development builds, several object-mask defaults have changed. Your darktablerc still holds the old values, which will override the new defaults. To pick up the new behaviour, close darktable and remove all object-mask entries from your config:
@Blaat_Aap , @dirksagwitz , @pehar : Thank you for reporting crushes when using updated object mask. I am trying to reproduce you issue, so would need a little bit more input from you. Thank you in advance!
First thing I would ask you is to start darktable in a fresh new workspace and repeat steps with object mask. I want to understand if default configs will produce the same crash.