class_docstr: This class stores the segmentation masks for all objects in one image, in
  the form of bitmaps.
  
  Attributes:
      tensor: bool Tensor of N,H,W, representing N instances in the image.
class_docstr_tok: ["This","class","stores","the","segmentation","masks","for","all","objects","in","one","image",",","in","the","form","of","bitmaps",".","Attributes",":","tensor",":","bool","Tensor","of","N",",","H",",","W",",","representing","N","instances","in","the","image","."]
docstr: Find masks that are non-empty.
  
  Returns:
      Tensor: a BoolTensor which represents
          whether each mask is empty (False) or non-empty (True).
docstr_tok: ["Find","masks","that","are","non-empty",".","Returns",":","Tensor",":","a","BoolTensor","which","represents","whether","each","mask","is","empty","(","False",")","or","non-empty","(","True",")","."]
code: def nonempty(self) -> torch.Tensor:
      """
      Find masks that are non-empty.
  
      Returns:
          Tensor: a BoolTensor which represents
              whether each mask is empty (False) or non-empty (True).
      """
      return self.tensor.flatten(1).any(dim=1)
  
imports: import copy
  import itertools
  import numpy
  from typing import Any, Iterator, List, Union
  import pycocotools.mask
  import torch
  from torch import device
  from detectron2.layers.roi_align import ROIAlign
  from detectron2.utils.memory import retry_if_cuda_oom
  from .boxes import Boxes
label_desc: Use image node_id 8 for calling the BitMasks obj's underlying member method code with example usage: obj.nonempty() and returns: self