What you might look at would be something that analyzed the traffic coming in, if you get 20 hits in a matter of seconds - perhaps temporarily block that particular IP address for a minute. I have no idea where you'd start with something like that. A bot will (likely) be doing something systematic and (reasonably) predicatble. It might help to try to limit (but not ban) that activity so you don't penalize legitimate usage.
You'd have to be careful with this - if it's a picture gallery, a single user will appear to "hit" the site 1+N(number of pictures) time within a very short period of time.