An automatic feature generation approach to multiple instance learning and its applications to image databases