MCPcopy Create free account
hub / github.com/deepbrainai-research/float / preprocess

Method preprocess

generate.py:68–74  ·  view source on GitHub ↗
(self, ref_path:str, audio_path:str, no_crop:bool)

Source from the content-addressed store, hash-verified

66
67
68 def preprocess(self, ref_path:str, audio_path:str, no_crop:bool) -> dict:
69 s = self.default_img_loader(ref_path)
70 if not no_crop:
71 s = self.process_img(s)
72 s = self.transform(image=s)['image'].unsqueeze(0)
73 a = self.default_aud_loader(audio_path).unsqueeze(0)
74 return {'s': s, 'a': a, 'p': None, 'e': None}
75
76
77class InferenceAgent:

Callers 1

run_inferenceMethod · 0.80

Calls 3

default_img_loaderMethod · 0.95
process_imgMethod · 0.95
default_aud_loaderMethod · 0.95

Tested by

no test coverage detected