Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to Export Predictions (keywords) Made with Vertex AI to Images

So I managed to create a data set, train a model, create a batch and run the model successfuly, and retrieve the data generated. The final step would be to actually use the data generated...Im having trouble with this. The results/predictions are in a jsonl file. Viewing that file im able to see the file names of the images and the keywords the model asssociated with them. But im stumped on what to do next. I mainly use xnviewmp for my images, creating keywords, etc. But their doesnt seem to be a way to import the keywords generated with Vertex AI and attach them to the corresponding image. I need a way to add the keywords in bulk. Anyone have any suggestions? Theres gotta be a tool that can do this. Basically a spreadsheet that lets me copy and paste in keywords to individual images. It was a lot of work getting this far, I dont want to quit so close to the end! Thank you in advance!

Solved Solved
1 2 793
1 ACCEPTED SOLUTION

Handling and associating generated keywords with images can indeed be a crucial step in utilizing the output from your model effectively.

You can try using a CSV or spreadsheet software (Excel, Google Sheets, etc.) where one column contains the image file names, and another column for the corresponding keywords generated by your model.

Ensure the image file names in your JSONL file match the file names in your dataset or folder structure. You can manually copy the keywords from your JSONL file and paste them alongside the respective image names in the spreadsheet. This would create a direct mapping between the images and their associated keywords.

Once your spreadsheet is ready with image names and their respective keywords, you might find tools or scripts that can automate the process of updating the keywords for your images. Some image management software or metadata editors might support importing keyword data from a CSV or spreadsheet. Explore metadata editing tools or batch processing tools that allow bulk editing of image metadata. A tool like ExifTool might offer functionality to import metadata from a CSV file and apply it to corresponding images.

If your dataset is extensive, you might consider writing a script in a programming language like Python to automate the process of associating keywords with images based on the data in your CSV file.

This process might depend on the capabilities of the tools you're using and the format of your data. It could involve a combination of manual work and scripting to efficiently associate keywords with your images in bulk.

View solution in original post

2 REPLIES 2

Handling and associating generated keywords with images can indeed be a crucial step in utilizing the output from your model effectively.

You can try using a CSV or spreadsheet software (Excel, Google Sheets, etc.) where one column contains the image file names, and another column for the corresponding keywords generated by your model.

Ensure the image file names in your JSONL file match the file names in your dataset or folder structure. You can manually copy the keywords from your JSONL file and paste them alongside the respective image names in the spreadsheet. This would create a direct mapping between the images and their associated keywords.

Once your spreadsheet is ready with image names and their respective keywords, you might find tools or scripts that can automate the process of updating the keywords for your images. Some image management software or metadata editors might support importing keyword data from a CSV or spreadsheet. Explore metadata editing tools or batch processing tools that allow bulk editing of image metadata. A tool like ExifTool might offer functionality to import metadata from a CSV file and apply it to corresponding images.

If your dataset is extensive, you might consider writing a script in a programming language like Python to automate the process of associating keywords with images based on the data in your CSV file.

This process might depend on the capabilities of the tools you're using and the format of your data. It could involve a combination of manual work and scripting to efficiently associate keywords with your images in bulk.

Solved!? Lol, I always thought the post creator determined if their issue/question had been solved. While I appreciate your answer, it did not solve my problem. I already had aspreadsheet with the keywords, the problem was in attaching them to the photots. I had already tried exiftool but it was a nightmare. I did go back to it however after finding no other solutions and was able able to get it semi working, but it is far from ideal.

Now this next part is just a suggestion/wish: It seems like it wouldn't be much more work for vertex ai to simply attach the keywords to the photos it analyses from your Google cloud photo bucket. All of the work is already done and it has direct access to all the photos. The user would then simply download the updated photos to their system, and boom, done!

The problem with almost all these ai tools is usability. 99% of people just won't be able to figure out how to use them or even attempt to. I don't expect that to change much anytime soon. But adding a few user friendly options like this when possible, when technical limitations is not the cause, would go a long ways in user adoption of all related tools.