picasa-face-import-20100829.12.zip
· FAQ
· Version History
· Update Log via RSS
· Installation instructions
· “Donationware” Registration Info
· More Lightroom Goodies
· All-Plugin Update Log via RSS
· My Photo-Tech Posts
· My Blog
In my December 2009 blog post ”Giving Up on Picasa Face Recognition”, I outlined a number of concerns with the face recognition of Google's Picasa Desktop photo-organizing application, and with trying to work the face-recognition results back into Lightroom.
I had built a Lightroom plugin for importing the data, and though I'm much less excited about it after finding the problems, I'm releasing it in case anyone else might find it useful.
WARNING WARNING WARNING
If you are considering to use the Picasa desktop application on the photos in your Lightroom catalog, be warned that Picasa may update your image files with its own metadata. This is perfectly fine if you don't mind your image files being changed, but some people prefer a workflow in which the out-of-camera files are absolutely immutable (that is, never, ever, changed).
If you fall into that category, be sure that you understand exactly if/when Picasa might want to change your files, and avoid it. In my case, I simply ensured that 1) I had a good backup before giving it a try, and 2) that every image file was marked “read only”.
Problems with Picasa
Please see ”Giving Up on Picasa Face Recognition” for a list of concerns about how well/efficient Picasa face recognition works. YMMV, but you may well decide, as I did, that it was not yet worth investing time in.
Using the Plugin
After having done face-recognition work on images in Picasa, simply select the same images in Lightroom and invoke “File > Plugin Extras > Import Picasa Face Data”. This will populate two plugin custom metadata items, “Has Face Data” and “Faces”, which can be viewed by selecting the All Plugin Metadata Metadata-viewer preset (to the left of “Metadata” on the right-side panel in the Library module).
The plugin matches up image data via image filename and path, so both Picasa and Lightroom must be working with the exact same image files (and not, for example, merely identical copies).
If you make changes in the list of faces for an image in Picasa, simply re-invoke the face-data import in Lightroom to read the new data.
You can also access the two custom metadata fields in the Library Grid Filter. However....
Problems with Lightroom
There is a bug in Lightroom 2 that causes the metadata filter to fail to actually show the selected images. After importing face data you can select “Faces” as a Metadata header in the Library Filter, as highlighted in blue in the screenshot at right.
Selecting a name should isolate related photos in the grid, and indeed it works fine in the LR3 beta, but it doesn't work in LR2. Sigh.
However, you can still do a text search via name, which as discussed below, may be better anyway.
What, no Keywords?
It would make much more sense to store the name data as keywords, but sadly, Lightroom's plugin infrastructure does not allow a plugin to set keywords, so I'm forced to shoehorn the data elsewhere.
Thus, I use a custom metadata field, “Faces”, to store the list of faces. For any particular photo, names are sorted in alphabetical order.
The real drawback to this is that if you want to view all images with a given face, you can't simply select the name, but must select any row that contains the name. Thus, in many cases it's easiest to just use the Library Grid Filter's text search for the name (which has the added benefit of actually working in LR2 where the metadata filter fails).
Availability
The plugin is currently available without restriction, except that it expires after a few months (at which point you'll have to update to a newer version). If some of the problems mentioned above are overcome and it starts to become a more serious plugin, I may move it to the same “donationware” registration model as most of my other plugins.
( Update Log via RSS| 20100829.12 | Made the revalidation process much simpler, doing away with the silly need for a revalidation file. |
| 20100820.11 | Discovered a bug in my plugin build system that caused horribly difficult-to-track-down errors in one plugin, so am pushing out rebuilt versions of all plugins just in case. |
| 20100625.10 | Yikes, shaking out some more build issues. |
| 20100624.9 | Discovered a nasty build bug; pushing a new version in case it affects this plugin. |
| 20100325.8 | Remove the expiration... sorry, that had been left over from testing. |
| 20100215.7 | My bad, sorry, hadn't tested the previous fix on Windows. |
| 20100212.6 | Add a dialog that allows the user to specify where the Picasa "db3" folder is on their system, for when the plugin can't figure it out on its own. Completely changed how the one-click upgrade applies the newly-downloaded zip file, in the hopes that it'll work for more people. Rather than unzipping over the old copy, it now unzips to a temporary folder, then moves the old folder out of the way and the new folder into place. Prior versions' folders are now maintained (with the version number in the folder) in case you want to revert a version; you may want to clear them out from time to time. Of course, it won't take affect until you try to upgrade after having upgraded to or beyond this version. |
| 20091224.5 | Turns out that there's a Lightroom limit to the length of names I can record for a photo, so to avoid errors, I've taken the equally unappealing option of lopping off the name list at its maximum value (511 bytes). |
| 20091216.4 | Okay, tried to be just a bit less stupid about looking for the "db3" folder. |
| 20091216.2 | Updated "db3" location for Win7. |
| 20091215.1 | Initial Public Release. |
Hello Jeffrey,
I just installed on lightroom 3 Beta, and i get this message when i try to import faces tagged on picasa
Can’t find picasa Database Folder ‘db3′
Any idea?
Greetings,
Manuel
Look around on your system for a folder named “db3″ and let me know the full path to it. On Windows XP it’s in the user’s Application Data / Google tree (within either “Picasa2″ or “Picasa3″). I suspect it’s different on Vista or Win7, so just let me know where…. —Jeffrey
I was under the impression Picasa didn’t change the original file either. It stores whatever edits you make in a .ini text file (I believe; can’t remember the extension, though I’m pretty sure it’s not xmp) for each directory. Only when you Save it would it then write the changes to an image file – though usually you rename it (and I think Picasa warns you about overwriting the original).
But it’s been a while since I’ve really used Picasa.
Jeffrey,
Thanks – this is fantastic. Can’t wait to try!
Dan
Jeffrey, I appreciate this is work in progress, but there’s an apparent bug – when importing into a largish catalog (15,000 pictures) it stops with an error: “searchable strings must be less than 512 bytes; this value is 736 bytes”.
cheers,
Dan
Take pictures with fewer people in them, or of people with shorter names.
I didn’t realize that there was a limit, but this is certainly because the list of people for a particular photo is too long. The best I can do now is lop off the list of names at the maximum length (I just pushed v5 that does that); let’s hope that Adobe eventually adds the ability to set keywords, so that I can dispense with this list-of-names kludge entirely. —Jeffrey
Ah, might be something to do with those wedding photos where Picasa had recognised 150 people…
thank you for the fix!
Dan
Thanks for another great plugin! I’ll give it a try tomorrow. I was playing around with Picasa a few weeks ago (doing like you said in your other post, “I’ll stop soon” while continuing to tag for another few hours). I was hoping you’d write something like this, I hadn’t found any other way to get the Picasa data into Lightroom.
Oh Jeffrey, you are a genius!
I was thinking, too, how to do the trick, but you already did it!
I have found no way of getting the data OUT of Picasa, may I ask (by PM) how you did the trick?
About importing as keywords: What about this: You could write a plain-text, tab-delimited (wonder about the encoding) file which the user could manually import via Metadata > Import Keywords. I am pretty sure that people would be willing to do this single manual step to get “real” keywords, in the end, setting the faces in Picasa involces plenty of manual work, too!
Three cheers!
Picasa writes the per-photo data to a per-folder file, “.picasa.ini”, which the plugin scans. That file encodes each person with a code, the mapping to name being found in another file in the Picasa app-data area. LR3 should allow plugins to write keywords, so I’m reticent to spend much time on workarounds now, but I’d not known about keyword import, so I’ll take a look. —Jeffrey
Jeffrey:
What a great piece of work! Just what I was looking for. One question though: what exactly is Picasa changing metadata-wise? Is it just adding some stuff, or is it also altering data what previously was entered in Lightroom?
Right now I am almost finished with taggin 150k of photo’s with around 200k of faces in it, so I hope you can answer my question before I screw the whole thing up…
BTW: I do have backups
The plugin adds one line of custom metadata to each image (visible in the All Plug-in Metadata viewer tagset), so it doesn’t change anything originally in LR. —Jeffrey
Thank you, the plugin is timesaver.
I’ve wrote a script for this task, it parses picasa.ini files, seeks for faces data and runs exiftool to add keywords directly into image file. But your plugin is more convenient and fast. Anyway my primary task is to separate photos with people, I don’t care who’s on them.
It looks like this plugin expired today. Could you release an update with an extended expiration date?
Sorry ’bout that… had forgotten about it. Just pushed a version that doesn’t expire. —Jeffrey
Wow! Awesome plug-in!
I had an similar Picasa face recognition experience as you. I spent a couple days compulsively recognizing faces even though I used LR. Being a programmer, I had thought maybe I’d research the Picasa database format and write some sort of way to import the data in XMP files for LR. But, I first did a search to see if someone else may have done something similar and I stubbled across your work.
This is fantastic! It worked just fine without any problems, and did the import of data quite quickly, especially considering I have over 13,000 photos.
I’ll definitely be sending a donation your way. Nice job!
Wouldn’t it be nice to take advantage of the amazing way that facebook’s tagging feature encourages group tagging activity? The whole community gets involved in saying who is who. This generates a lot of good data on people (sometimes people we don’t even know.) Would there be any way to take all the tagging information from fb photos and apply that to the home database?
Indeed, good idea… I’ll have to look into that. Won’t be until after Lr3 is out and the dust settles a bit, though. —Jeffrey
Hu Jeffrey,
I guess you’re super busy, but please could you give picasa face import some loving for lightroom 3?
I believe plugins can now write the keywords directly to normal metadata? Any other LR3 specific improvements you could add?
Thanks for the great plugins!!!
Mike.
Hi Jeffrey,
Another decoding issue. Looks like the program is not handling face ID’s that begin with zero correctly.
An ID such as:
found 010452c72fe3d62f [Melissa]
will not get handled correctly for the INI entry:
[Picture 7-27-2003 4-12-17 PM.jpg]
screensaver=yes
faces=rect64(a84c1a00ee1989dd),10452c72fe3d62f;rect64(3fb343997e999bdd),6178bfef60d710f2
backuphash=18949
I think the leading zero(s) is causing problems.
I have about 6000 ID’s in my database, it is mostly working. Debug log is very helpful.
Tom