code: def __init__(
      self,
      annotations_dir: Union[str, Path],
      images_dir: Union[str, Path],
      masks_dir: Union[str, Path],
      class_map: Optional[ClassMap] = None,
      idmap: Optional[IDMap] = None,
  ):
      super().__init__(
          annotations_dir=annotations_dir,
          images_dir=images_dir,
          class_map=class_map,
          idmap=idmap,
      )
      self.masks_dir = masks_dir
      self.mask_files = get_image_files(masks_dir)
  
      self._record_id2maskfile = {
          self.record_id_mask(o): o for o in self.mask_files
      }
  
      # filter annotations
      masks_ids = frozenset(self._record_id2maskfile.keys())
      self._intersection = []
      for item in super().__iter__():
          super().prepare(item)
          if super().record_id(item) in masks_ids:
              self._intersection.append(item)
  
imports: import xml.etree.ElementTree
  from icevision.imports import *
  from icevision.utils import *
  from icevision.core import *
  from icevision.parsers.parser import *
label_desc: Use image node_id 1 to create a new VOCMaskParser object from inherited base classes: VOCBBoxParser with example: obj = VOCMaskParser(annotations_dir, images_dir, masks_dir, class_map, idmap)