class_docstr: Dataset for COCO.
class_docstr_tok: ["Dataset","for","COCO","."]
docstr: Filter annotations according to filter_cfg.
  
  Returns:
      List[dict]: Filtered results.
docstr_tok: ["Filter","annotations","according","to","filter_cfg",".","Returns",":","List","[","dict","]",":","Filtered","results","."]
code: def filter_data(self) -> List[dict]:
      """Filter annotations according to filter_cfg.
  
      Returns:
          List[dict]: Filtered results.
      """
      if self.test_mode:
          return self.data_list
  
      if self.filter_cfg is None:
          return self.data_list
  
      filter_empty_gt = self.filter_cfg.get("filter_empty_gt", False)
      min_size = self.filter_cfg.get("min_size", 0)
  
      # obtain images that contain annotation
      ids_with_ann = set(
          data_info["img_id"] for data_info in self.data_list
      )
      # obtain images that contain annotations of the required categories
      ids_in_cat = set()
      for i, class_id in enumerate(self.cat_ids):
          ids_in_cat |= set(self.cat_img_map[class_id])
      # merge the image id sets of the two conditions and use the merged set
      # to filter out images if self.filter_empty_gt=True
      ids_in_cat &= ids_with_ann
  
      valid_data_infos = []
      for i, data_info in enumerate(self.data_list):
          img_id = data_info["img_id"]
          width = data_info["width"]
          height = data_info["height"]
          if filter_empty_gt and img_id not in ids_in_cat:
              continue
          if min(width, height) >= min_size:
              valid_data_infos.append(data_info)
  
      return valid_data_infos
  
file_path: mmdetection/projects/EfficientDet/efficientdet/tensorflow/coco_90class.py
imports: import copy
  import os.path
  from typing import List, Union
  from mmengine.fileio import get_local_path
  from mmdet.datasets.base_det_dataset import BaseDetDataset
  from mmdet.registry import DATASETS
  from .api_wrappers import COCO
label_desc: Use image node_id 3 for calling the Coco90Dataset obj's underlying member method code with example usage: obj.filter_data() and returns: valid_data_infos, self, self