MCPcopy
hub / github.com/triple-mu/YOLOv8-TensorRT / preprocess

Function preprocess

models/tasks/pose.py:14–18  ·  view source on GitHub ↗
(bgr, ctx)

Source from the content-addressed store, hash-verified

12
13
14def preprocess(bgr, ctx):
15 img, ratio, dwdh = letterbox(bgr, (ctx.width, ctx.height))
16 rgb = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
17 tensor = blob(rgb, return_seg=False)
18 return tensor, (ratio, dwdh)
19
20
21def postprocess(data, meta, draw, ctx) -> bool:

Callers

nothing calls this directly

Calls 2

letterboxFunction · 0.90
blobFunction · 0.90

Tested by

no test coverage detected