restrict image groups to the ones having images from different directories