As a general rule I don't have too many adsense ads on my main site because of wanting a positive user experience etc.
But I was just looking at a site very much like my own (and that doesn't appear to have been penalised) and instead of photos opening in a modal popup window when clicked every photo opened a bigger version in a completely new page with adsense above, to the side and below.
I have always ruled out this approach post-Panda because you end up with lots of thin content pages.
OK three ads is probably still too much but do you think it would it be OK to do this if the photo pages were:
1) treated as canonical versions of the main page
and / or
2) noindex/nofollow pages
and/or
3) blocked in robots.txt
and/or
4) on a completely different domain name which it wouldn't matter if G hit with panda?
This looked like quite a good way of increasing adsense earning without negatively impacting the user experience...