Visual Learning With Weak Supervision: Applications In Video Summarization And Person Re-Identification