Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Faces shows incorrect thumbnails

Having trouble with iPhoto. The Faces part was working properly, but not having these symptoms:

1. When I select Faces, the people shown are not the one showing in the thumbnail in some cases. Opening the picture shows the individual is in the photo, the info tab shows the person is in the photo, but the photo does not show the person.

2. When I select Faces, sometimes the face shown is not the correct face.

It used to be perfect, but now it is not.


I've used all the options within iPhoto under Option & Command start, and have rebuilt it using iPhoto Library Manager.

MacBook Air, OS X Mountain Lion (10.8.3)

Posted on May 26, 2013 3:42 PM

Reply
49 replies

Jul 12, 2013 3:14 PM in response to Tom Ritch

I had opened another thread: iphoto is crashing, and Old Toad made this suggestion. I've done it and am watching to see whether it crashes again.


I also found that if I have my desktop set to choose a photo from iPhoto, it causes the fan to run and the device gets quite warm.


Try the following:


1 - delete the iPhoto preference file, com.apple.iPhoto.plist, that resides in your

User/Home/Library/ Preferences folder.


2 - delete iPhoto's cache file, Cache.db, that is located in your

User/Home/Library/Caches/com.apple.iPhoto folder (Snow Leopard and Earlier).


https://discussions.apple.com/content/attachment/190905040


or with Lion and Mt. Lion from the User/Library/Containers/com.apple.iPhoto/
Data/Library/Caches/com.apple.iPhoto
folder


https://discussions.apple.com/content/attachment/182509040


3 - launch iPhoto and try again.


NOTE 1: If you're moved your library from its default location in your Home/Pictures folder you will have to point iPhoto to its new location when you next open iPhoto by holding down the Option key when launching iPhoto. You'll also have to reset the iPhoto's various preferences.


NOTE 2: In Lion and Mountain Lion the Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and hit the Enter button - 10.7: Un-hide the User Library folder.

Jul 12, 2013 7:44 PM in response to Tom Ritch

Nope, I still crash. Here is what I wrote in the report sent to Apple.

Going through a set of photos deleting found faces that I dod not want to be found. As I clicked the right arrow key to move to the next photo, iPhoto crashed.


I should note that in addition to the files suggested above for deletion, in my

Containers/com.apple.iPhoto/
Data/Library/Caches/com.apple.iPhoto
folder

I found and removed Cache.db-shm and Cache.db-wal in addition to Cache.db. Looked like more cahes so it seemed the right thing to do. Also present but not deleted was folder config which containined

cdd043e8387ac70d08f2d9db3ad5873a.plist


After deleting the files I launched iPhoto. It did not have a library to open, so it created a new empty one. I used File > Switch To Library to open my main library. In the library I noticed a type of corruption which I think we have not discussed. For some of my events, a few (3 to maybe 10?) photos are duplicated (I think) and put into a new event next to the existing event. I merged these back into the event holding the large majority of photos for that day so later I can check for duplicates. I set a key photos for a few events. I split one event which contained unrelated activities which occurred on the same day into two events. I opened one of the events and began going through the photos manyually looking for duplicastes or Faces corruption. After a minite or two, when I clicked the right arrow key to move to another photo, iPhoto crashed.


After the crash i reopened iPhoto. I looked at the new event I created which contains two photos. In the iPhoto window which displays events, the new event is listed without a key photo, and the text says it contains 0 photos. When I open the event, the two photos are there.


I think it is time to rebuld my library again.

Jul 13, 2013 8:44 AM in response to Tom Ritch

Tom,

I was disheartened that my suggestion for improving the health of your iPhoto file did not work. I realized today that I had done a step before that I had not mentioned to you. My assumption was that step was a waste of time. I realized today that maybe that step enabled the other step to work. I've laid out below a rigid process you might like to try. It incorporates everything I think worked for me. My intention would be to share this with Apple if it works. I'm using a pseudo-code method. Everything following a semicolon is a comment.


Known issues that will use workarounds:

1. iPhoto has problems with faces that are added, are not anything close to square, and have one edge of the frame coinciding with the edge of the picture. One can see that error by creating such a face (say 5 times taller than wide), on one edge of the photo. iPhoto will show the face both on the photo and in the sidebar, however if one goes to a different photo, then returns, the face box and name will be missing. Workaround: don't identify that face

2. Dock has problems using the iPhoto library as a source for desktop background when multiple monitors are involved and all are using iPhoto. Problem is exacerbated when the user changes the library they are working on. Dock hangs up, driving CPU usage over 90%. Workaround: don't use iPhoto as a source for Desktop Backgrounds or screen savers.

3. iTunes is aware of the filename of the iPhoto library that has been synched to the iPhone or iPad, but only has access to the iPhoto library last active in iPhoto. If one attempts to synch an iPhone or iPad when the last opened library in iPhoto was not the one last used to synch the iPhone or iPad, iTunes will offer to erase all photos and start over. Workaround: if that warning appears, close iTunes, open iPhoto and select the library you want synched. Reopen iTunes and proceed normally.


Suspected issues with iPhoto:

1. The automatic face detection process has a bug which can lead to a contaminated database. There is no known way to turn this off in iPhoto.

2. I suspect the Detect Missing Faces option in iPhoto simply manually activates the automatic face detection process for the photo which is open. Because that process has a suspected bug, do not use the Detect Missing Faces command. Instead, add new faces manually.

3. The Rebuild feature of iPhoto tends to make contaminated databases worse. Do not use this feature. The iPhoto Library Manager rebuild feature does not either make the issues worse, or fix them.


Overview: The process below makes a new iPhoto library from each Event in your existing Master Library. That new library is then repaired and imported into a New Master Library. After that import each Event Library can be archived for potential future usage.

Keeping track of the numbers: I think it would be helpful to keep track of the number of issues and number of issues repaired at each step. I've used the term "Record" in the lines below to mark suggested places to capture numbers.

Setup: The process below will triple the disk storage requirements of your current Master File. If you archive each Event Library off your main drive, you will only need twice the space plus the size of your largest event's new library.

Find the least corrupted recent copy of your iPhoto library. I'll call it the "Master Library." The libraries created from each event will be called "Event Libraries." The new consolidated library will be called "New Master Library."


<Start>

For each Event in Master Library

in iPhoto Library Manager (ILM) create a new library called the same as the Event

in ILM, select the Master Library and drag that Event to the new Event Library

Open the Event Library in iPhoto

Record the number of photos

Create a new SmartAlbum where: Face is unnamed

Name the new SmartAlbum "Unnamed"

Record the number of photos in Unnamed

Empty iPhoto trash

For each Set of about 15 photos ;The process is faster with larger sets, however you will need to remember, visually, which photos were in the set to see which were cured and which were not. Number you choose is at your convenience

;Throughout the process below, the photo you are working with may disappear. That is because it no longer meets the SmartAlbum criterion: it contains an unnamed face. This is a good thing and not cause for concern.

;Pass 1

For each photo in Set

Double-click the thumbnail and select the Info button in the lower right.

Ignore the content in the right-hand panel below the word "Faces"

Correct the faces in the photo. Delete detected unnamed faces which are either not faces or are faces which you do not want to track. Use the "Add a face…" dialogue to add missing faces.

Next photo

Select all photos in this set

Press Option+Command+Delete ;As this is an album and not the photos list, pressing Delete by itself will only delete it from the album

Select the iPhoto Trash

Select all photos in iPhoto Trash

Right-click, select "Put Back"

Return to Unnamed Smart Album

Record the number of photos in this set that have returned


;Pass 2

For each remaining photo in this Set that has reappeared in SmartAlbum Unnamed

Double-click the thumbnail and select the Info button in the lower right

Throughout the process below, deleted any undesired Unnamed face when you see it.

For each face:

Delete the face

Use the "Add a face…" dialogue to put the face back ;sometimes you will find an Unnamed face behind a named face

Next face

Next photo

Select all photos remaining in this Set

Press Option+Command+Delete

Select the iPhoto Trash

Select all photos in iPhoto Trash

Right-click, select "Put Back"

Return to Unnamed Smart Album

Record the number of photos in this Set that have returned


;Pass 3

For each remaining photo in this Set

Record the meaningful metadata (date, location, faces, description)

Export the original photo to some convenient location

Delete the photo using Option+Command+Delete

Empty the iPhoto trash

Import the photo

Restore the metadata

Record the number of photos in this set that have returned

If the photo has returned to SmartAlbum Unnamed

Delete the photo using Option+Command+Delete

Open the exported copy of the photo in Preview

Save it with new specifications ;example, if it is a TIFF, save as a .JPG

Import the new photo

Restore the metadata

End if

Record the number of photos in this set that returned

If the photo has returned to SmartAlbum Unnamed

Delete the photo using Option+Command+Delete

Move the exported photo to a problem photos folder

End if

Next photo

Next Set


;At this point, the SmartAlbum Unnamed should have no contents


Under Library, select Faces

Record the number of Key Faces that are black

For each Key Photo that is black

Select a different Key Photo

Next Key Photo that is black

Record the number of Key Faces that do not show the face of the named person

For each Named Person

Double-click the Key photo

For each photo in Named Person

Double-click the photo and make sure Info is selected.

Correct the faces in the photo. Delete detected unnamed faces which are either not faces or are faces which you do not want to track. Use the "Add a face…" dialogue to add missing faces.

Next photo

Select all photos for this Named Person

Delete using Option+Command+Delete

Select the iPhoto Trash

Select all photos in iPhoto Trash

Right-click, select "Put Back"

Next Named Person


Go to SmartAlbum Unnamed

If any photos appear, follow the process above to clear them


Close iPhoto


Open ILM

If this is the first Event, create a new Library called "New Master Library"

Select the Event Library

Drag all photos to the New Master Library

Open the New Master Library

If this is the first Event, create a new SmartAlbum where Face is unnamed. Call it Unnamed

Verify SmartAlbum Unnamed is empty. If not, record number of entries. Likely no point in continuing.

Next Event

<End>


Hope this helps!!

Jul 13, 2013 12:16 PM in response to Dan Connors

Tom,

Just reread your last post. I had a similar issue with iPhoto creating duplicates. I think rather than duplicates they were the originals of photos that had been edited. (So the two photos were the original and the edited version.) I happened to be looking at the database with an Apple level 2 watching my screen. His advice was to delete that file and roll back to an earlier version. This duplication appeared immediately after running iPhoto rebuild, which is why I think it also has a bug in it.

Jul 13, 2013 12:30 PM in response to Dan Connors

Your post is not clear - but if you are suggesting that users delete any thing from the content of the iPhoto library using the finder then you are recommending that they destroy their library - you must NEVER make any changes of any sort to the content or structure of the iPhoto library - doing so will corrupt your library and cause data and possibly photo loss


And note that iPhoto ALWAYS maintains the original of every photo - if the photo is edited then there is a preview of the edited version too as well as a thumbnail for each photo - that is the way it works - if that is not what you want then you need to use a different program


LN

Jul 14, 2013 7:00 PM in response to Dan Connors

To keep the current discussion up to date, I have copied below my comments on two crash reports I sent to Apple after two crashes this morning.


After a full rebuilt of my main library intended to remove all library database corruption, I opened an event and opened the first photo, then paged through all the event photos removing corrupt found faces when I saw them. After reviewing all photos in that event, I selected photos which did not yet have a Place and assigned one. Then I closed that event, proceeded to another event, and repeated the process. I did this successfully with several events. Then I opened an event which contained many photos with obvious Faces database corruption. Examples of the corruption are


1. Two found face rectangles for the same person, where one enclosed the correct face and the other is a characteristic rectangle of H:W proportions 5:2 offset from the face location.


2. Obvious clearly shown faces which are not detected. I know sometime this happens, but I believe some of these had been found before but now are not.


3. A found face is listed in the Info panel with the name of the person in the photo, but no found face rectangle shown. Running Detect Missing Faces does not show a found face rectangle.


4. In a photo which shows two faces, one is found and labeled with the correct name, the other not found. On running Detect Missing Faces the face which had been unfound becomes found and the face which had been found becomes unfound, and the name is moved to the found face to label it incorrectly. After correcting the name and running Detect Missing Faces a second time, the second face becomes found and can be assigned the correct name.


I proceeded from the beginning of the exemplars for this Face, stepping to the next photo by the right arrow key and corrected found face errors such as these in about 20 photos. When I click right arrow to advance from photo 80 to 81, the last photo in the group, iPhoto crashed.


This experience, combined with a lot of earlier similar experiences, leads me to believe there are bugs, probably multiple bugs, in the Found Face part of iPhoto. One set of issues seems to be in the system which detects and labels faces. Perhaps another issue may involve iPhoto's management, specifically updating, of the database of found faces. Issues with finding faces are described above.


I believe this crash, and many similar iPhoto crashes in the last few weeks, may be caused when I switch from one photo to another as iPhoto is updating its found face database in the background. IIRC the crashes all have happened after I have edited found face data in a number of photos in fairly rapid succession, with the apparent proximal trigger for the crash being switching to a new photo. This seems fairly reproducible on my system since it has happened numerous times, although not "click this button and crash" reproducible.


I reopened the library after the crash just reported. The edits I had made had not been recorded, so I stepped through again, reediting the photos. When I clicked to go from the next to last to last photo, iPhoto crashed again.


Now I will reopen and repeat. I expect the edits have not been saved. This time before I get to the last photo I will quit iPhoto, hopefully getting the library to write the updates to the database on disk. Then I will reopen and see if the edited and been saved, and if I can then proceed through the rest of the faces without crashing.


Another edit, another crash?


I launched iPhoto and found the edits had not been saved when iPhoto crashed an hour ago. I reedited and stepped through almost all the photos, then Quit iPhoto. On relaunching I found the edits had now been saved. Being saved now tells us that iPhoto can be edited successfully. Not begin saved earlier tell us that iPhoto can accumulate a stack of unsaved edits. I wonder what the limits are on this accumulation of unsaved database edits, and how they interact with one another.


Although I did not edit much, I did run Detect Missing Faces a couple of times, so an unsaved edit may have existed. When I clicked to move from the nest to last to the past photo in the event, iPhoto crashed.


Also worth noting is that when I started reviewing photos this event, the event contained 81 photos. Two crashes back it contained 80 photos. Now 79. I don't know what photos are missing or why.

This time I opened iPhoto and the same library and event. Instead of starting with the first and stepping through all photos, I selected the past photo and pressed the space bar to open it. iPhoto crashed. Although other photos certainly had corrupt found faces, this one photo seems to have something very wrong.


Found one problem. I have a avi format movie with my photos. What I discovered is crashing occurred when I tried to open this movie. I trashed that movie from iPhoto, then with Handbrake converted it to an Apple TV compatible movie. That movie could not be imported back into iPhoto, but it could into iTunes, where I will leave it. Going into iTunes but not iPhoto seems strange to me. This video was taken with an older camera. Video shot with my current camera I think is compatible, but I wonder how many more oler incompatible videos I have.


iPhoto should degrade more gracefully when it encounters an incompatible format. Perhaps rather than crashing, the exception could be trapped and the photo skipped with at minimum an "Incompatible format" message.


I sent these comments to Apple as a folowup on the crash reports I submitted earlier today.

Jul 14, 2013 7:52 PM in response to Dan Connors

Dan,


First let me thank you for a huge analysis of the issue. Having said that, I must say I get tired just thinking about trying to carry out what you suggest. I see it is written an a format which could easily become a conmputer script. I can imagine that if implemented in iOhoto Library Manager it woiuld take days running constantly to carry out. But even it the process were fully automated I think I see problems.


I think a lot of the problems we see are associated with automatic Face detection. In a place or two you recommend deleting automatically found Faces, and replacing thenm with manually found and identified faces. One problem is manually found Faces are not used as exemplars by the face search method. But the search method needs positive examplars to function, and the more the better. The more faces are manually identified, the worse automated search performance we can expect.


Automated face detection and labeling (when it works) is intended to save labor. Manual review and documentation errors for each photo and each face, for multiple passes even, does not seem like it would save effort.


While iPhoto contains one of more bugs, as I think we both believe, the task of cleaning up libraries will be not just Herculean, but also Sisyphean. Better minimize repair efforts, but not cries for help, as we wait for a fix.


Redoing everytning would be a task so huge I do not want to think about it. Although I do have problems with some parts of my pibrary, many parts seem OK, at least mostly. For now, I prefer to manually repair little things, and hope Apple will present a clear and correct and as fully as possible automated soluion.


I see now that reliably updating the database after repairs apparrently requires quitting and restarting iPhoto. That may help in preserving work done, so cleanup progress can be more steady.


Another "trick" I found is revealing found face rectangles which are hidden behing one another. I put trick in quotes because this is standard Mac user interface so it should have been obvious, but took me a while to catch on. <Tab> tabs between selected objects. So click on one face, then tab to successively select each other found facee. The name is selected, so when you want to delete the rectangle click it, then you can click its close x.


In some cases a name is listed as being found but no rectangle is shown. I have found no way to deleted such a found face. I suspect the rectangle has been assigned to an area not in the visible part of the photo. I suspect we will have to wait for Apple to provade a fix for this.


Hope this helps.

Jul 15, 2013 7:31 AM in response to Tom Ritch

Tom,


In my desire to be thorough, I certainly did made it appear Herculean. The good news, I spent quite a bit of time in the last week making certain all the Places were proper and had no trouble with iPhoto. (I feel like an alchoholic: I've been 7 days without an iPhoto problem.)


I can imagine looking at the number of photos in your library that the task looks overwhelming. Here are some statistics that seem to describe what happened when I went through my library. I did not do the steps in the order listed. I actually went through the Faces and made corrections, then found when I used the Unnamed SmartAlbum, I was correcting many of the same errors again--which is why I reversed the order.


Anyway, in the library of 6,000 photos: 2 photos could not be corrected. They always produced errors. I removed them from the library and deleted them--wish I had saved them to provide to Apple.


About 8% of the library appeared at the start of the first task. So, for an event of 500 photos, that is 40 photos. As I entered Phase 2, there were typically about 2 photos that needed the second step. Except for the 2 photos I mentioned that had to be deleted, none went through any further steps. Complete processing of 500 photos tookabout 20 minutes.


I've never found the automatic face detection that useful (likely for two reasons: 1) I use the manual face detection a lot, and 2) I have the habit of tagging people in the photo even if it is the back of their head, which likely doesn't help!). Thanks for the tip on the <Tab> key.


I wish you the best of luck!

Jul 17, 2013 2:44 PM in response to Tom Ritch

I found a solution to the numerous crashes I was experiencing: reinstall Security update 2013-003 and restart.


I went to my crashing video in the Finder and tried to open it with Quicktime, which also crashed. I tried several more videos, all of which used to work, all now crashed. I searched Apple Quicktime forums for crashes and found several threads, as well as reports that other video and photo apps such as Aperture are crashing. In one Quicktime thread the solution descrbed was posted. It also worked for me.


Now I can return to looking for problems which are only in iPhoto. That should keep me busy enough. 😀

Jul 30, 2013 3:35 PM in response to Tom Ritch

Update: My joy was short lived. I kept getting the feeling something weird was happening, but couldn't pin it down. Symptom was it seemed like I was seeing duplicates. I went back to some archieved copies and found, for sure, evidence that iPhoto was duplicating.

User uploaded file

Pic above is screenshot on 6/30. Notice row 3, 2nd to rightmost photo is a cropped version of row 4, 2nd photo from left. Also row 4, leftmost photo is cropped version of row 3 rightmost photo. Also notice 4th row, 6th photo is a dupe of 5th row 5th photo.


Pic below is screenshot on 7/11. Notice on 6/30 there were 4 photos of my wife shooting the gun (she's not usually like this!) and on 7/11 there were 6. In addition, the photo on row 4, left most and same row, 2nd from right is the same photo.

User uploaded file

So I was left here: my iPhoto library is contaminated and I know of no tools to repair it. What now?


I had tried Aperture and was convinced it had caused the original contamination in the iPhoto library--what if I was wrong? I decided to recreate my entire library in Aperture with no direct communication between Aperture and iPhoto. Aperture's import and faces tools are superior to iPhotos, which made this project work--though it probably took 30 hours to migrate the 6,000 photos in my library. Good news: no weirdnesses noted in Aperture, and no crashes (although I was not getting any in iPhoto either).


iPhoto supports exporting the originals. Unfortunately, that removes Faces and Places data that had been added in iPhoto. I created my first Aperture library called "Originals" and exported everything from my iPhoto library to a folder, then imported that entire folder into Aperture, using a clean import profile (no changes to anything). I have a 2012 MBP 13" Retina and I'd guess it was about 45 minutes before the CPU meters went below 80%. It loads the photos, generates the Retina thumbnails, and does a Faces lookup. I did nothing else with this file.


I went back to iPhoto and selected Export .jpg at highest resolution with Faces and Places selected and dumped each event, one at a time into a folder, than imported the event into Aperture. I modified the import settings to:

- Name the version YYYY MM where the year and month are taken from the information embedded in the photo by iPhoto.

- Perform the Autoenhance adjustment as each photo was brought in.

This took a lot longer, which is why I did it by Events.


Now, consider, each photo is either a .jpg version of the original (which was likely a .jpg anyway) or a .jpg version of the edited version--I no longer have the real original. I decided that if I really needed the original, I would go to the "Originals" file, export it, switch to this library and import it. So far, I've done that once.


Next, I needed to correct some dates. Many of my source photos were scans. While I had changed the date in iPhoto, there were cases where I did not check "Change original." There is a batch change function in Aperture that works like iPhoto and I corrected all of the messed up dates. It was quite convenient to have iPhoto open on one monitor and Aperture on the other, looking at the same pictures.


Opening Faces shows a window of all the unnamed faces in the file. This interface is really slick and significantly faster that the method in iPhoto. You type in the first one or two letters of the name, press Return, and it automatically advances to the next unnamed photo. You can also right-click and select "Not a face."


Finally, I went through each of the photos and added missing faces and corrected any errors I may have made.


As I finished the project, I had learned a lot about Aperture and decided I would never open the new libraries in iPhoto.


One undesirable side effect is that iPhoto Library Manager does not work with Aperture libraries. I've put ILM on my "unsure" list as I'm not sure if it wasn't the source of the contamination as I was doing some pretty hefty manipulations using ILM and importing events from one library into another about the time fram iPhoto became unreliable.


Anyway, I don't know if this helps anyone, but it's worked for me. And I love Aperture.

Aug 7, 2013 3:23 PM in response to Dan Connors

I have gone through the most common faces and manually removed corrupt found Faces as described above. I have found that iPhoto does not write edits to disk until it is Quit. If too many edits accumulate not written to disk, iPhoto crashes and all edits done in that session are lost. By rmembering to periodically Quit and relaunch iPhoto I have been able to remove most obviously corrupt found Faces. Before beginning to manually remove corrupt found faces I first rebuilt the library using iPhoto's repair tool. After a crash or two I suspected problems, so I ran iPhoto's Repair Database tool.


On photos where the Face thumb was obviously wrong (turned at a right angle, wrong face, grey instead of photo image, etc.) I ran Dected Missing Faces. Sometimes DMF would run quickly, sometimes it would take a couple of seconds. Sometimes running DMF caused the photo displayed to advance to the next photo in the set, usually not. I suspect when DMF is run part of the photo's metadata assoociated wtih Faces is replaced. My hope is that the metadata replaced contained the corruption. After all this manual cleainging I ran iPhoto's Rebuild Faces. The rebuilt Faces seem much more correct.


This is a long slow process, but it seems I am making progress. Much remaining corruption may be things I did not see and remove earlier, which may be removed by another iteration.


In 563 photos it seems I cannot manually remove the corruption. One example is a photo where I know the face was found earlier but no face is found now. In some such cases the Info may list the name of the formerly found Face even though there is no found Face rectangle. Another common example is the Face thumb is rotated 90 degrees. If rebuilding the Faces thumb database does not fix this I will export the photos, open them in some other application, perhaps QuickTime and resave a copy which I hope will bestripped of corruption, then reimoprt into iPhoto.


Dan,


I appreciate you comments on Aperture. I have wondered about going over to it. However, while the Aperture grass may look greener, all software has bugs. Better stick wiith the devil I know. I have sent lots of bug reports and feature requests to Apple. For now I will stick with iPhoto, continue cleaning manually wtih periodic rebuilds, and frequent backups. It seems fairly usable now.


Tom

Faces shows incorrect thumbnails

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.