Replies: 13 comments 14 replies
-
@whenever I'm preparing a script in NodeJS so that we can use the same library (exitfool-vendored) Immich is using to parse metadata. I'll post it here as soon as I have a first version ready |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest: just going over the questions you answered a few days ago One name per rectangle _> 4. Probably have to add RegionAreaUnit tag
By this I assume you mean that the program that reads the Region metadata into Immich assumes Normalized and therefore the tag does not need to be there?
So we would leave the metadata that is embedded jpg files alone and create separate sidecar files with the equivalent MWG regions metadata. It would be easy to see which has changed and either update the ACDsee embedded or the MWG Sidecar? Should we do the same for the other metadata such as categories? Does Immich look at both embedded and sidecar and if so how does it decide which to use. Maybe we should consider duplicating all the metadata in the sidecar with the few changes needed for MWG regions. On the NodeJS, as I said I am not a coder. I know what NodeJS is conceptually so I may need a little help with that. |
Beta Was this translation helpful? Give feedback.
-
Hi @whenever! I've managed to get the script working. I've published it at https://github.com/bugfest/exif-companion I had some issues with exif-vendored library due to an internal issue when serializing the face regions into the metadata, I believe it's a bug of this library and I'll open an Issue/PR on their repo. In the mean time I've forked the library and published a branch with the fix we need. Here you have an screenshot of your test ACDSee picture after import it with the sidecar generated by my script: I'm pretty sure the script can be improved to automate the generation of the modified XMP files. I have some ideas but before implementing them I'd like you to verify this approach works for you. |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest: What you show in the attached PNG looks great. The approach sounds great, in fact it looks like you've done what I'm looking for. I'm not sure how I set it up on my system to run. I've installed NodeJS, cloned exif-companion and then ran it using my test picture from acdsee. Had a few issues involving module yargs not found, but I think I resolved those. When I run it I get an .xmp file but as best as I can see, on my end it is still using ACDSee regions. In my case the face regions do not show up in DigiKam or in Immich when I import the processed picture. I think I'm missing something. Do you want me to run something on my system? |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest: I've included a Zip of inputs, outputs and a txt of the Powershell run with debug enabled. Comparing the 2 output.xmp files, the one you sent and the one in this zip, they start out similar but after a page it becomes unreadable. My set up is as follows: Windows 11 machine
Cheers: Whenever |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest I've been planning to set up external libraries on Immich as it is how I want to deal with things in the longterm. I've just not got round to figuring that out. I will do that now. The XMP input file, are you generating that with exiftool and if so are there any special parameters. Normally I just drag the files onto specific exe files (exiftool(-a -u -g1 -w xmp).exe). I'll report back once I've tried it using external libraries |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest: I've got the external libraries set up on Immich. The facial import works well on the DigiKam jpg's. I've updated exif-companion. I've tried this 3 ways
None of these case are recognized by Immich and they all show unrecognized faces. I seem to remember that jpg which have facial metadata would not be processed by Immich facial recognition. |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest This is fantastic I reread your last message, I tried it by just using the .jpg for the input (.i.e. no sidecar at all) and it imported the names and regions, thumbnail is not working but I think that's a similar issue that I had before. I must be doing something wrong when I extract the XMP file using exiftool. |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest: I am quite excited, the .jpg input/output filename works well and refreshing the thumbnails fixed the issue. I would prefer to use the XML sidecar method that you are using as it does keep my original files unchanged, however I am at a loss to figure out how to get it working. I've tried variations of exiftool directly, variations of DigiKam writing to xmp files using exiftool and not using exiftool. No success. How did you create the xmp sidecar that is then processed by exic-companion? Your plans on how you will deploy the final product may make this issue moot. As to process:
Thanks for all you great work so far Whenever |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest I've gotten a bat file written that goes through all the .jpg files in a directory and process them through exif-companion. I did all my testing using the test pictures that I sent you, When I got to the point of using my actual pictures, exif-companion gives errors and does not write out the mwg regions. In the same bat run, the test files always work. I've attached 2 txt of a short run of jpg, one with and one without --debug I can send you the bat file if you like, its very simple |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest There are at least 2 types of errors, I've managed to track down one of them (this one accounts for most of the errors I've seen), and at least one cause is that there is a categories: line in the embedded xmp data (could be other causes too). I made the following changes to xmp.ts on my own branch around 74 const partialMetadata = { await exiftool.write(outputFilePath, partialMetadata) While this may effect the --keep option exif-companion, files that have categories are processed and the facial data shows up on Immich Still trying to track down the cause of the other error type. Cheers Whenever |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest I've tracked down the cause of the second error type. Occasionally ACDSee does not include the ALGAreas only the DLY Areas. I changed XMP.ts to use DLY instead and they all worked. I will run a batch with a lot more pictures to see how it goes. |
Beta Was this translation helpful? Give feedback.
-
Hi @bugfest I know that this is not high priority. What you've done with exif-companion is gold for me and I can't thank you enough. I am going to continue looking for, and likely finding, error conditions for exif-companion and, with a lot of help for copilot, fix them on my branch if I can or develop a workaround. My question to you, do you want to hear about the issues I find with exif-companion? or should I continue on in silence? Is there a better way to let you know about these issues? I'm not familiar with github to even be sure that you are still getting these notes. My latest discovery
I will keep adding discoveries here unless you tell me otherwise. Cheers Whenever |
Beta Was this translation helpful? Give feedback.
-
@whenever OP: #6455 (comment)
Beta Was this translation helpful? Give feedback.
All reactions