Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Louis committed Sep 8, 2023
1 parent 5ef30d6 commit 4973199
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mmpose/evaluation/metrics/coco_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np
from mmengine.evaluator import BaseMetric
from mmengine.fileio import dump, get_local_path, load
from mmengine.logging import MessageHub, MMLogger
from mmengine.logging import MessageHub, MMLogger, print_log
from xtcocotools.coco import COCO
from xtcocotools.cocoeval import COCOeval

Expand Down Expand Up @@ -173,6 +173,10 @@ def dataset_meta(self, dataset_meta: dict) -> None:
if ann_file is not None:
with get_local_path(ann_file) as local_path:
self.coco = COCO(local_path)
print_log(
f'CocoMetric for dataset '
f"{dataset_meta['dataset_name']} has successfully "
f'loaded the annotation file from {ann_file}', 'current')

def process(self, data_batch: Sequence[dict],
data_samples: Sequence[dict]) -> None:
Expand Down

0 comments on commit 4973199

Please sign in to comment.