MCPcopy Create free account
hub / github.com/MatrixTeam-AI/RAIN / func

Function func

gradio_app.py:133–145  ·  view source on GitHub ↗
(value, frame)

Source from the content-addressed store, hash-verified

131
132def set_params(name):
133 def func(value, frame):
134 global params
135 global a
136 params[name] = value
137 a.set_translations(param2translations(**params))
138 if(frame is None):
139 return None
140 h, w = frame.shape[:2]
141 d = int(min(h, w) * cropping)
142 mh = (h - d) // 2
143 mw = (w - d) // 2
144 frame = frame[mh:h-mh,mw:w-mw,:]
145 return a.face_tracker.detect(frame)
146
147 return func
148

Callers

nothing calls this directly

Calls 3

param2translationsFunction · 0.70
set_translationsMethod · 0.45
detectMethod · 0.45

Tested by

no test coverage detected