Learning for Object Localization with Imperfect Data