(self, ref_path:str, audio_path:str, no_crop:bool)
| 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 | |
| 77 | class InferenceAgent: |
no test coverage detected