class_docstr: Base DensePose sampler to produce DensePose data from DensePose predictions.
  Samples for each class are drawn according to some distribution over all pixels estimated
  to belong to that class.
docstr: Constructor
  
  Args:
    count_per_class (int): the sampler produces at most `count_per_class`
        samples for each category
docstr_tok: ["Constructor","Args",":","count_per_class","(","int",")",":","the","sampler","produces","at","most","`","count_per_class","`","samples","for","each","category"]
code: def __init__(self, count_per_class: int = 8):
      """
      Constructor
  
      Args:
        count_per_class (int): the sampler produces at most `count_per_class`
            samples for each category
      """
      self.count_per_class = count_per_class
  
file_path: detectron2/projects/DensePose/densepose/data/samplers/densepose_base.py
imports: from typing import Any, Dict, List, Tuple
  import torch
  from torch.nn import functional
  from detectron2.structures import BoxMode, Instances
  from densepose.converters import ToChartResultConverter
  from densepose.converters.base import IntTupleBox, make_int_box
  from densepose.structures import DensePoseDataRelative, DensePoseList
label_desc: Use image node_id 1 to create a new DensePoseBaseSampler object  with example: obj = DensePoseBaseSampler(count_per_class)