Skip to content

Commit

Permalink
Address Breaking Detectron Test
Browse files Browse the repository at this point in the history
Summary: Moved evaluator builder function to eval callback function to remove cfg as a parameter to RotatedCocoEvaluator as it is of type DictConfig and not CfgNode. As a result, cfg.TEST.KEYPOINT_OKS_SIGMAS field is unused for RotatedCocoEvaluator in config file (should be okay unless want to set kpt_oks_sigmas through config file).

Reviewed By: luyich

Differential Revision: D66061894

fbshipit-source-id: 68684e661b69bc7e1458d8775d5766356b865e45
  • Loading branch information
Leon Dong authored and facebook-github-bot committed Nov 17, 2024
1 parent 8eff074 commit 754469e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions detectron2/evaluation/coco_evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from collections import OrderedDict
import pycocotools.mask as mask_util
import torch
from omegaconf import DictConfig
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
from tabulate import tabulate
Expand Down Expand Up @@ -115,7 +114,7 @@ def __init__(
max_dets_per_image = [1, 10, max_dets_per_image]
self._max_dets_per_image = max_dets_per_image

if tasks is not None and (isinstance(tasks, CfgNode) or isinstance(tasks, DictConfig)):
if tasks is not None and isinstance(tasks, CfgNode):
kpt_oks_sigmas = (
tasks.TEST.KEYPOINT_OKS_SIGMAS if not kpt_oks_sigmas else kpt_oks_sigmas
)
Expand Down

0 comments on commit 754469e

Please sign in to comment.