Exploiting weakly supervised visual patterns to learn from partial annotations