Skip to content

Commit 8eff074

Browse files
Leon Dongfacebook-github-bot
Leon Dong
authored andcommitted
Eval Callback for Vizard Detector
Summary: Added an eval callback for the vizard detector to replace evaluation done natively in vizard. Evaluation is now called at the end of cfg.TEST.EVAL_PERIOD train steps and is a more direct migration of the d2go evaluator code. - EMA not yet enabled, EMA eval code is commented out for now - Modified COCO evaluation to accept cfg of shape DictConfig - Removed eval_step override in unit, eval_step will not be used anymore Reviewed By: luyich Differential Revision: D65966876 fbshipit-source-id: 1e46d2f59919a883bb4a8b07d5c2417033df151d
1 parent 9131ce0 commit 8eff074

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

detectron2/evaluation/coco_evaluation.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from collections import OrderedDict
1212
import pycocotools.mask as mask_util
1313
import torch
14+
from omegaconf import DictConfig
1415
from pycocotools.coco import COCO
1516
from pycocotools.cocoeval import COCOeval
1617
from tabulate import tabulate
@@ -114,7 +115,7 @@ def __init__(
114115
max_dets_per_image = [1, 10, max_dets_per_image]
115116
self._max_dets_per_image = max_dets_per_image
116117

117-
if tasks is not None and isinstance(tasks, CfgNode):
118+
if tasks is not None and (isinstance(tasks, CfgNode) or isinstance(tasks, DictConfig)):
118119
kpt_oks_sigmas = (
119120
tasks.TEST.KEYPOINT_OKS_SIGMAS if not kpt_oks_sigmas else kpt_oks_sigmas
120121
)

0 commit comments

Comments
 (0)