MCPcopy Create free account
hub / github.com/BICLab/SpikeYOLO / add

Method add

ultralytics/utils/instance.py:108–120  ·  view source on GitHub ↗

Args: offset (tuple | list | int): the offset for four coords.

(self, offset)

Source from the content-addressed store, hash-verified

106 self.bboxes[:, 3] *= scale[3]
107
108 def add(self, offset):
109 """
110 Args:
111 offset (tuple | list | int): the offset for four coords.
112 """
113 if isinstance(offset, Number):
114 offset = to_4tuple(offset)
115 assert isinstance(offset, (tuple, list))
116 assert len(offset) == 4
117 self.bboxes[:, 0] += offset[0]
118 self.bboxes[:, 1] += offset[1]
119 self.bboxes[:, 2] += offset[2]
120 self.bboxes[:, 3] += offset[3]
121
122 def __len__(self):
123 """Return the number of boxes."""

Callers 4

add_paddingMethod · 0.45
export_onnxMethod · 0.45
_pipeline_coremlMethod · 0.45
stepMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected