class_docstr: Bbox sampling result.
  
  Args:
      pos_inds (Tensor): Indices of positive samples.
      neg_inds (Tensor): Indices of negative samples.
      priors (Tensor): The priors can be anchors or points,
          or the bboxes predicted by the previous stage.
      gt_bboxes (Tensor): Ground truth of bboxes.
      assign_result (:obj:`AssignResult`): Assigning results.
      gt_flags (Tensor): The Ground truth flags.
      avg_factor_with_neg (bool):  If True, ``avg_factor`` equal to
          the number of total priors; Otherwise, it is the number of
          positive priors. Defaults to True.
  
  Example:
      >>> # xdoctest: +IGNORE_WANT
      >>> from mmdet.models.task_modules.samplers.sampling_result import *  # NOQA
      >>> self = SamplingResult.random(rng=10)
      >>> print(f'self = {self}')
      self = <SamplingResult({
          'neg_inds': tensor([1,  2,  3,  5,  6,  7,  8,
                              9, 10, 11, 12, 13]),
          'neg_priors': torch.Size([12, 4]),
          'num_gts': 1,
          'num_neg': 12,
          'num_pos': 1,
          'avg_factor': 13,
          'pos_assigned_gt_inds': tensor([0]),
          'pos_inds': tensor([0]),
          'pos_is_gt': tensor([1], dtype=torch.uint8),
          'pos_priors': torch.Size([1, 4])
      })>
class_docstr_tok: ["Bbox","sampling","result",".","Args",":","pos_inds","(","Tensor",")",":","Indices","of","positive","samples",".","neg_inds","(","Tensor",")",":","Indices","of","negative","samples",".","priors","(","Tensor",")",":","The","priors","can","be","anchors","or","points",",","or","the","bboxes","predicted","by","the","previous","stage",".","gt_bboxes","(","Tensor",")",":","Ground","truth","of","bboxes",".","assign_result","(",":","obj",":","`","AssignResult","`",")",":","Assigning","results",".","gt_flags","(","Tensor",")",":","The","Ground","truth","flags",".","avg_factor_with_neg","(","bool",")",":","If","True",",","``","avg_factor","``","equal","to","the","number","of","total","priors",";","Otherwise",",","it","is","the","number","of","positive","priors",".","Defaults","to","True",".","Example",":",">",">",">","#","xdoctest",":","+IGNORE_WANT",">",">",">","from","mmdet.models.task_modules.samplers.sampling_result","import","*","#","NOQA",">",">",">","self","=","SamplingResult.random","(","rng=10",")",">",">",">","print","(","f'self","=","{","self","}","'",")","self","=","<","SamplingResult","(","{","'neg_inds","'",":","tensor","(","[","1",",","2",",","3",",","5",",","6",",","7",",","8",",","9",",","10",",","11",",","12",",","13","]",")",",","'neg_priors","'",":","torch.Size","(","[","12",",","4","]",")",",","'num_gts","'",":","1",",","'num_neg","'",":","12",",","'num_pos","'",":","1",",","'avg_factor","'",":","13",",","'pos_assigned_gt_inds","'",":","tensor","(","[","0","]",")",",","'pos_inds","'",":","tensor","(","[","0","]",")",",","'pos_is_gt","'",":","tensor","(","[","1","]",",","dtype=torch.uint8",")",",","'pos_priors","'",":","torch.Size","(","[","1",",","4","]",")","}",")",">"]
code: def __nice__(self):
      data = self.info.copy()
      data["pos_priors"] = data.pop("pos_priors").shape
      data["neg_priors"] = data.pop("neg_priors").shape
      parts = [f"'{k}': {v!r}" for k, v in sorted(data.items())]
      body = "    " + ",\n    ".join(parts)
      return "{\n" + body + "\n}"
  
file_path: mmdetection/mmdet/models/task_modules/samplers/sampling_result.py
imports: import warnings
  import numpy
  import torch
  from torch import Tensor
  from mmdet.structures.bbox import BaseBoxes, cat_boxes
  from mmdet.utils import util_mixins
  from mmdet.utils.util_random import ensure_rng
  from ..assigners import AssignResult
label_desc: Use image node_id 7 for calling the SamplingResult obj's underlying member method code with example usage: obj.__nice__() and returns: unknown