MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / push

Method push

scenedetect/detectors/transnet_v2.py:36–46  ·  view source on GitHub ↗
(self, ys: np.ndarray, ts: np.ndarray)

Source from the content-addressed store, hash-verified

34 self.flash_filter = flash_filter
35
36 def push(self, ys: np.ndarray, ts: np.ndarray):
37 predictions = (ys > self.threshold).astype(np.uint8)
38
39 cuts = []
40 for y, t in zip(predictions, ts, strict=True):
41 if self.y_prev == 0 and y == 1 and self.i > 0:
42 cuts.append(t)
43 self.y_prev = y
44 self.i += 1
45
46 return cuts
47
48
49class Predictor:

Callers 3

_inferenceMethod · 0.45
process_frameMethod · 0.45
post_processMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected