MCPcopy Create free account
hub / github.com/FeiYull/TensorRT-Alpha / predict

Method predict

examples/python_with_dll/python_trt.py:27–32  ·  view source on GitHub ↗
(self, img)

Source from the content-addressed store, hash-verified

25 num_class)
26
27 def predict(self, img):
28 rows, cols = img.shape[0], img.shape[1]
29 res_arr = np.zeros((self.max_bbox, 6), dtype=np.float32)
30 self.yolo.Detect(self.c_point, c_int(rows), c_int(cols), img.ctypes.data_as(POINTER(c_ubyte)), res_arr)
31 self.bbox_array = res_arr[~(res_arr == 0).all(1)]
32 return self.bbox_array
33
34
35class_names = [

Callers 2

img_pred_threadFunction · 0.95
python_trt.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected