MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / parseNp

Method parseNp

PATH/core/solvers/utils/detools/box.py:84–91  ·  view source on GitHub ↗

:meth: parse from numpy array :param arr: a numpy array in the format of [x, y, x1, y1] :type arr: numpy.array

(self, arr)

Source from the content-addressed store, hash-verified

82 return odf
83
84 def parseNp(self, arr):
85 """
86 :meth: parse from numpy array
87 :param arr: a numpy array in the format of [x, y, x1, y1]
88 :type arr: numpy.array
89 """
90 self.x, self.y, self.w, self.h = map(float, \
91 [arr[0], arr[1], (arr[2]-arr[0]), (arr[3]-arr[1])])
92
93 def dumpNp(self):
94 """

Callers 1

draw_img_boxesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected