class_docstr: Accumulates annotations by batches that correspond to objects detected on
  individual images. Can pack them together into single tensors.
class_docstr_tok: ["Accumulates","annotations","by","batches","that","correspond","to","objects","detected","on","individual","images",".","Can","pack","them","together","into","single","tensors","."]
docstr: Accumulate instances data for one image, given that the data is not empty
  
  Args:
      box_xywh_gt (tensor): GT bounding box
      box_xywh_est (tensor): estimated bounding box
      dp_gt (DensePoseDataRelative): GT densepose data
docstr_tok: ["Accumulate","instances","data","for","one","image",",","given","that","the","data","is","not","empty","Args",":","box_xywh_gt","(","tensor",")",":","GT","bounding","box","box_xywh_est","(","tensor",")",":","estimated","bounding","box","dp_gt","(","DensePoseDataRelative",")",":","GT","densepose","data"]
code: def _do_accumulate(
      self,
      box_xywh_gt: torch.Tensor,
      box_xywh_est: torch.Tensor,
      dp_gt: DensePoseDataRelative,
  ):
      """
      Accumulate instances data for one image, given that the data is not empty
  
      Args:
          box_xywh_gt (tensor): GT bounding box
          box_xywh_est (tensor): estimated bounding box
          dp_gt (DensePoseDataRelative): GT densepose data
      """
      self.i_gt.append(dp_gt.i)
      self.x_gt.append(dp_gt.x)
      self.y_gt.append(dp_gt.y)
      self.u_gt.append(dp_gt.u)
      self.v_gt.append(dp_gt.v)
      if hasattr(dp_gt, "segm"):
          self.s_gt.append(dp_gt.segm.unsqueeze(0))
      self.bbox_xywh_gt.append(box_xywh_gt.view(-1, 4))
      self.bbox_xywh_est.append(box_xywh_est.view(-1, 4))
      self.point_bbox_with_dp_indices.append(
          torch.full_like(dp_gt.i, self.nxt_bbox_with_dp_index)
      )
      self.point_bbox_indices.append(
          torch.full_like(dp_gt.i, self.nxt_bbox_index)
      )
      self.bbox_indices.append(self.nxt_bbox_index)
      self.nxt_bbox_with_dp_index += 1
  
imports: from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from typing import Any, Dict, List, Optional, Tuple
  import torch
  from torch.nn import functional
  from detectron2.structures import BoxMode, Instances
  from densepose import DensePoseDataRelative
label_desc: Use image node_id 3 for calling the ChartBasedAnnotationsAccumulator obj's underlying member method code with example usage: obj._do_accumulate(box_xywh_gt, box_xywh_est, dp_gt) without return types