MCPcopy
hub / github.com/hzwer/ECCV2022-RIFE / inference

Function inference

benchmark/HD_multi_4X.py:34–51  ·  view source on GitHub ↗
(I0, I1, pad, multi=2, arbitrary=True)

Source from the content-addressed store, hash-verified

32 ('HD_dataset/HD544p_GT/Sintel_Temple2_1280x544.yuv', 544, 1280),
33]
34def inference(I0, I1, pad, multi=2, arbitrary=True):
35 img = [I0, I1]
36 if not arbitrary:
37 for i in range(multi):
38 res = [I0]
39 for j in range(len(img) - 1):
40 res.append(model.inference(img[j], img[j + 1]))
41 res.append(img[j + 1])
42 img = res
43 else:
44 img = [I0]
45 p = 2**multi
46 for i in range(p-1):
47 img.append(model.inference(I0, I1, timestep=(i+1)*(1./p)))
48 img.append(I1)
49 for i in range(len(img)):
50 img[i] = img[i][0][:, pad: -pad]
51 return img[1: -1]
52
53tot = []
54for data in name_list:

Callers 1

HD_multi_4X.pyFile · 0.85

Calls 1

inferenceMethod · 0.45

Tested by

no test coverage detected