Segment Anything — open source segmentation by Meta

You can try it at https://segment-anything.com/demo

Code at https://github.com/facebookresearch/segment-anything

Article at https://arstechnica.com/information-technology/2023/04/meta-introduces-ai-model-that-can-isolate-and-mask-objects-within-images/

To those who understand code… Could this, theoretically, be used to implement Lightroom style auto masking in darktable or Rawtherapee? :slight_smile:

3 Likes

It is technically possible to integrate, yes. Will it happen? No, probably not. Or at least not anytime soon.

We already get a lot of flack for being “hard to use.”

Have you tried to set any of these AI things up? Pain in the ass. The models take up a ton of disk space.

2 Likes

An automated application of the entire parametric range against a sample would in itself be useful. Many years ago I used a similar technique to select specific values from satellite RGB data. We refined the result by having an add and a reduce capability along with secondary area selection.
So much of the work is really already done with dt. This is really not an ‘AI’ situation … much/most of the work is already fully implemented.

1 Like

An automated creation of DT masks would indeed be useful. A Lua script could be the glue between the applications. Take the shapes generated by SAM and convert them to DT mask’s.

I found the DT database table that contains the masks, but the shapes itself are binary blobs? A quick look at the Lua API didn’t reveal any function to access or create the mask’s. Maybe a developer knows more?

the darktable masks are defined by vector shapes or image content based parameters.
Unless SAM output is a kind of a vector shape there’s no way to convert them to dt since dt masks aren’t pixel based