Simultaneous Object Detection and Ranking with Weak Supervision