Writing Description as Keywords

Started by Powertower, February 06, 2025, 09:31:19 PM

Previous topic - Next topic

Powertower

HI,
I have most of my files described but not keyworded. I played now some time with Autotagger but I couldnĀ“t find a prompt to write the description (a lot are locations) as Keywords. Has anyone else found out how to do it?
Thanks

Mario

I don't understand what you want. "Write the description as keywords". What does that mean? Can you give an example?

You can ask the AI for information about an image and then direct the returned data into XMP description, XMP hierarchical keywords or a dedicated AI tag.

Powertower

For example:
City Palace, Jaipur, Jaipur, Rajasthan, India is in the description and now I want that AI is writing that as keywords.

Mario

Your description is already a list of keywords.
Why not use a Metadata Template to copy from {File.MD.keywords} into {File.MD.hierarchicalkeywords}?
You'll have to ensure that the , is replaced with a ; using this variable as the source:
{File.MD.description|replace:~,==~;}

To use AI, this prompt for Ollama seems to work:

Replace the blank and comma in this text "{File.MD.description}" and return a list of words separated with ;

Use this prompt for keywords, leaving the other prompts unused. Give it a try.

Powertower

Many thanks- I want to do this with thousands of photos would that work as batch?

Lincoln

Interesting method  :-\ What would be the advantage of using AI for this? I just create a group entry in the Keyword Thesaurus for this. Limited experience with AI - just trying to understand the advantage.

Powertower

I have virtually 1 Mio photos with descriptions but no keywords. What I would like to do is using AI to create Keywords and in addition use the existing descriptions (mostly locations) to write as Keywords.

Mario

I would not use AI for this simple task. Processing a million files will take a very long time.
Create a Metadata Template as shown and apply it to any number of files (work in batches of thousands, not one million files at once). This will be very fast.

Then you can run the AI to create additional keywords as needed.

PS.: I see you are using blanks in your keywords ("City Palace") so the prompt should not mention blanks. Better would probably be (test it!)

Replace the commas in this text with semicolons: "{File.MD.description}".

Powertower