MCPcopy Create free account
hub / github.com/MegEngine/MegFlow / __init__

Method __init__

flow-python/examples/application/electric_bicycle/det.py:20–34  ·  view source on GitHub ↗
(self, name, args)

Source from the content-addressed store, hash-verified

18@register(inputs=['inp'], outputs=['out'])
19class Detect:
20 def __init__(self, name, args):
21 logger.info("loading MEMD detection...")
22 self._nms = args['nms_thres']
23 self._score = args['score_thres']
24 self._interval = args['interval']
25 self._visualize = args['visualize']
26 self.name = name
27
28 # load model and warmup
29 self._model = load_onnx_model(args['path'])
30 warmup_data = np.zeros((256, 256, 3), dtype=np.uint8)
31 run(self._model, warmup_data, ["elec_cycle"], self._score,
32 self._nms)
33
34 logger.info(" MEMD loaded.")
35
36 @staticmethod
37 def restrict(val, min, max):

Callers

nothing calls this directly

Calls 3

load_onnx_modelFunction · 0.90
runFunction · 0.90
infoMethod · 0.45

Tested by

no test coverage detected