def _proposal2json(self, results):
    'Convert proposal results to COCO json style.'
    json_results = []
    for idx in range(len(self)):
        img_id = self.img_ids[idx]
        bboxes = results[idx]
        for i in range(bboxes.shape[0]):
            data = dict()
            data['image_id'] = img_id
            data['bbox'] = self.xyxy2xywh(bboxes[i])
            data['score'] = float(bboxes[i][4])
            data['category_id'] = 1
            json_results.append(data)
    return json_results
Convert proposal results to COCO json style.
def _proposal2json(self, results):
    
    json_results = []
    for idx in range(len(self)):
        img_id = self.img_ids[idx]
        bboxes = results[idx]
        for i in range(bboxes.shape[0]):
            data = dict()
            data['image_id'] = img_id
            data['bbox'] = self.xyxy2xywh(bboxes[i])
            data['score'] = float(bboxes[i][4])
            data['category_id'] = 1
            json_results.append(data)
    return json_results