class_docstr: This class stores the segmentation masks for all objects in one image, in the form of polygons.
  
  Attributes:
      polygons: list[list[ndarray]]. Each ndarray is a float64 vector representing a polygon.
class_docstr_tok: ["This","class","stores","the","segmentation","masks","for","all","objects","in","one","image",",","in","the","form","of","polygons",".","Attributes",":","polygons",":","list","[","list","[","ndarray","]","]",".","Each","ndarray","is","a","float64","vector","representing","a","polygon","."]
docstr: Find masks that are non-empty.
  
  Returns:
      Tensor:
          a BoolTensor which represents whether each mask is empty (False) or not (True).
docstr_tok: ["Find","masks","that","are","non-empty",".","Returns",":","Tensor",":","a","BoolTensor","which","represents","whether","each","mask","is","empty","(","False",")","or","not","(","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 not (True).
      """
      keep = [1 if len(polygon) > 0 else 0 for polygon in self.polygons]
      return torch.from_numpy(np.asarray(keep, dtype=np.bool))
  
imports: import copy
  import itertools
  from typing import Any, Iterator, List, Union
  import numpy
  import torch
  import torchvision
  from .boxes import Boxes
label_desc: Use image node_id 5 for calling the PolygonMasks obj's underlying member method code with example usage: obj.nonempty() and returns: torch