Plugin for creating automatic tags

Justo to let you know, photils script is causing dt to hang on close because the database maintenance dialog doesn’t show up.

darktable hangs because it is expecting input from the user. See the debugging messages suggesting that dt entered the maintenance dialog state?

You can simulate that by setting database fragmentation ratio threshold to zero (to force the window to pop up all the time) and check for database maintenance to on close , on settings storage tab.

Not sure if this can be related to the new ubuntu 20.04 (not sure if I had already installed photils on 18.04)

If I disable photils in lua.rc, the dialog shows up as expected. Also, enabling another script (face_recognition), doesn’t cause any problem.

1 Like

Thanks for that. I’ve recognized such problem as well but it was more random instead of constantly reproducible. Actually there is only one section in the code which cause this error but I will check why this is sometimes working and sometimes not.

1 Like

Maybe the randomness is given by each database fragmentation level, depending on which the maintenance is triggered.
That’s why i suggested to lower the threshold to zero, so that the database maintenance is enforced every time you close dt.
EDIT: I mean, when I enforced DB maintenance, the issue was constantly arising.

1 Like

Hello everyone,

I’ve released a new version of photils-cli and the darktable integration photils-dt. The main changes are that photils-cli works now completely offline, so no internet connection is required anymore and as a consequence no data leaving the system (@Tobias, @majobu ). Additionally, you have now the opportunity to filter the number of tags by a confidence threshold. That gives you a little bit more control for the suggested tags. All tags are sorted by the corresponding confidence values what results in tags at the beginning with a higher relevance.

Hopefully, you like the new features.

Greetings

Tobi

P.S.
@gadolf the new version should also solve the issue with a hanging darktable on exit

6 Likes

@scheckmedia Really nice, I’ll try to test it at the weekend.

And as users are never satisfied, I hope training the network with my own pictures is on you to do list. :wink:

1 Like

cool, thank you! Since just now, yes, I’ve a new point on my to-do list :slight_smile:

A couple of questions:
Will phottils be added into the master and is there a time frame for that?
Does photils read RAW data … or does it need a JPG file?

Hey David, if we talk about the lua-script master, then, since couple of days, photils is part of it.

Some formats like Nikons NEF or Canons CR2 are supported, but for the darktable integration I’ve decided to use a jpeg version. Basically, because raw files are not cropped but it can make a huge difference whether you use your whole image or a cropped region of interest for the prediction.

But feel free to try the photils-cli version whether your raw format is supporter, if necessary.

thanks Tobias; Just updated my scripts and have also updated directly from git … no signs of photils in the listing … am I missing something?
In general I do not create jpgs but maintain my data as fuji raw+sidecar. What is the long term plan for raw data?

Is the scripts remote repository at GitHub? Because at GitHub the script has listened under contributed.

If you have the darktable integration you don’t have to think about what format you use because this happens for you in the background. If darktable can read your data then photils can do it as well. But if you want to use the standalone version of photils-cli without darktable then there are limitations as I mentioned before. But in the near future I think I will add raw support but that’s not on the high priority list.

@scheckmedia

  • One thing I’d like to have is a possibility to translate the tag list.
  • Have you already made some performance measurement? I’m curious what the bottlenecks are. I would expect that the export is quite slow. Perhaps PPM or PFM is faster then jpeg as it has no compression. But the old rule is: “never optimize without measurement.”

@davidvj You need to download photils-cli and then require the script in the luarc file. The script exports a temp jpeg, runs the photils-cli tool on the command line, deletes the jpeg and reads the tags from photils-cli back to darktable.

I think (I’ll check this in the next few days) that there will be a bottleneck for both approaches because the CNN needs an input dimension of 224x224. Anyway, if we use PPM, PFM, or just extract the preview image from the raw file, these files need to be downsampled to the required dimension.

Would you prefer a translation implementation in photils-cli or the darktable plugin? There ~3600 classes, I think if we provide something like key - value (key = English, value = translation) pairs, it could help to avoid a translation of all available keywords.

I think having the translations in photils-cli would have the advantage to have this translations in other scripts too.

Can this service be setup to get tags in other languages than English ?

Not yet but as discussed before it’s on the todo for the next days. At least the opportunity for each user to provide it’s own translation. I think I’ve not the time to create the translations by my self I leave it to the community :grin:

1 Like

If they’re relatively simple terms, we can machine translate them :slight_smile:

1 Like

I can see many place names in the ‘big-list’ but how do I access them. How may I add specific tags other than using dt’ basic tagging system.

Actually, I replaced all places from the taglist, I think you’ve watch at a non up to date list.

Anyway there is no way at the moment to train the neural network with your own data and as consequence there ist no way to add your own tags for the algorithm.

Tobias, many thanks for this. It comes highly appreciated. I have been successful in installing both the photils-cli appimage as well as the lua plugin. When I select a group of images the plugin guesses tags (and does so with astonishing accuracy BTW).

However below the taglist is the remark that “The suggested tags were not generated for the selected image!” and upon applying on any kind of group of images, the tags will only be applied to the first image in the selection.

Hello Mike, thank you for your feedback. The output:

The suggested tags were not generated for the selected image!

is just a warning. I thought it could be useful to inform the user that the current tags are not related to the newly selected image. At the moment it’s not possible to predict tags for multiple selected images, that’s the reason for this message.

After some weeks of working with the plugin, I also observed that it could be useful to apply the selected tags to multiple selected images. I will add this as a feature request and implement this in a new version (if I find time in the next weeks).

1 Like