Detection now works for multiple images.