MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / __call__

Method __call__

monai/apps/detection/transforms/array.py:143–153  ·  view source on GitHub ↗

Converts the boxes in src_mode to the dst_mode. Args: boxes: source bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode`` Returns: bounding boxes with target mode, with same data type as ``boxes``, does n

(self, boxes: NdarrayOrTensor)

Source from the content-addressed store, hash-verified

141 self.dst_mode = dst_mode
142
143 def __call__(self, boxes: NdarrayOrTensor) -> NdarrayOrTensor:
144 """
145 Converts the boxes in src_mode to the dst_mode.
146
147 Args:
148 boxes: source bounding boxes, Nx4 or Nx6 torch tensor or ndarray. The box mode is assumed to be ``StandardMode``
149
150 Returns:
151 bounding boxes with target mode, with same data type as ``boxes``, does not share memory with ``boxes``
152 """
153 return convert_box_mode(boxes, src_mode=self.src_mode, dst_mode=self.dst_mode)
154
155
156class ConvertBoxToStandardMode(Transform):

Callers

nothing calls this directly

Calls 1

convert_box_modeFunction · 0.90

Tested by

no test coverage detected