Learning to Discover and Detect Objects