finished loop for object detection