Active Learning for Image Recognition and Retrieval