You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``i had implement a custom dataset in instance segmentation ,which labels is labelme json, but in mmdet ,there is no evaluation metric for labelme json, so i modified the coco metrix as follows: val_evaluator = dict( type='CisdiMetric', ann_file=None, metric=['bbox', 'segm'], format_only=False, backend_args=backend_args) test_evaluator = val_evaluator , and in metrics, i use the following code to get the `gt,if self._coco_api is None:
# TODO: Need to refactor to support LoadAnnotations
assert 'gt_instances' in data_sample,
'ground truth is required for evaluation when '
'`ann_file` is not provided'
gt['anns'] = []
# print(data_sample)
boxes = data_sample['gt_instances']['bboxes'].detach().cpu().numpy()
labels = data_sample['gt_instances']['labels'].detach().cpu().numpy()
masks = [] if data_sample['gt_instances'].get('masks',None) is None else data_sample['gt_instances']['masks'].raw_masks
# print(data_sample['gt_instances']['masks'])
for bbox, label, mask in zip(boxes, labels, masks):
gt['anns'].append({'bbox': bbox, 'bbox_label': label,"mask":mask})
# gt['anns'] = data_sample['gt_instances']
# add converted result to the results list
self.results.append((gt, result))`, but the result is all map is 0,
The text was updated successfully, but these errors were encountered:
``i had implement a custom dataset in instance segmentation ,which labels is labelme json, but in mmdet ,there is no evaluation metric for labelme json, so i modified the coco metrix as follows:
val_evaluator = dict( type='CisdiMetric', ann_file=None, metric=['bbox', 'segm'], format_only=False, backend_args=backend_args) test_evaluator = val_evaluator
, and in metrics, i use the following code to get the `gt,if self._coco_api is None:# TODO: Need to refactor to support LoadAnnotations
assert 'gt_instances' in data_sample,
'ground truth is required for evaluation when '
'`ann_file` is not provided'
gt['anns'] = []
# print(data_sample)
boxes = data_sample['gt_instances']['bboxes'].detach().cpu().numpy()
labels = data_sample['gt_instances']['labels'].detach().cpu().numpy()
masks = [] if data_sample['gt_instances'].get('masks',None) is None else data_sample['gt_instances']['masks'].raw_masks
# print(data_sample['gt_instances']['masks'])
for bbox, label, mask in zip(boxes, labels, masks):
gt['anns'].append({'bbox': bbox, 'bbox_label': label,"mask":mask})
# gt['anns'] = data_sample['gt_instances']
# add converted result to the results list
self.results.append((gt, result))`, but the result is all map is 0,
The text was updated successfully, but these errors were encountered: