class_docstr: Utility class to track recall@k for various k, split by categories.
class_docstr_tok: ["Utility","class","to","track","recall","@","k","for","various","k",",","split","by","categories","."]
docstr: Log a negative hit @k for given category.
docstr_tok: ["Log","a","negative","hit","@","k","for","given","category","."]
code: def add_negative(self, k: int, category: str):
      """Log a negative hit @k for given category."""
      if k not in self.total_byk_bycat:
          raise RuntimeError(f"{k} is not a valid recall threshold")
      self.total_byk_bycat[k][category] += 1
  
file_path: mmdetection/mmdet/evaluation/metrics/flickr30k_metric.py
imports: from collections import defaultdict
  from typing import Dict, List, Optional, Sequence
  import numpy
  from mmengine.evaluator import BaseMetric
  from mmengine.logging import MMLogger
  from mmdet.registry import METRICS
  from ..functional import bbox_overlaps
label_desc: Use image node_id 3 for calling the RecallTracker obj's underlying member method code with example usage: obj.add_negative(k, category) without return types