MCPcopy Create free account
hub / github.com/MotrixLab/ADHMR / load_img

Function load_img

HMR-Scorer/common/utils/preprocessing.py:12–21  ·  view source on GitHub ↗
(path, order='RGB')

Source from the content-addressed store, hash-verified

10
11
12def load_img(path, order='RGB'):
13 img = cv2.imread(path, cv2.IMREAD_COLOR | cv2.IMREAD_IGNORE_ORIENTATION)
14 if not isinstance(img, np.ndarray):
15 raise IOError("Fail to read %s" % path)
16
17 if order == 'RGB':
18 img = img[:, :, ::-1].copy()
19
20 img = img.astype(np.float32)
21 return img
22
23
24def get_bbox(joint_img, joint_valid, extend_ratio=1.2):

Callers 11

__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
evaluateMethod · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90
__getitem__Method · 0.90

Calls

no outgoing calls

Tested by 1

__getitem__Method · 0.72