(self, img_rgb, crop_factor)
| 351 | return self.mask_img |
| 352 | |
| 353 | def crop_face(self, img_rgb, crop_factor): |
| 354 | crop_region = self.detect_face(img_rgb, crop_factor) |
| 355 | face_region, is_changed = self.calc_face_region(crop_region, get_rgb_size(img_rgb)) |
| 356 | face_img = rgb_crop(img_rgb, face_region) |
| 357 | if is_changed: face_img = self.expand_img(face_img, crop_region) |
| 358 | return face_img |
| 359 | |
| 360 | def prepare_source(self, source_image, crop_factor, is_video = False, tracking = False): |
| 361 | print("Prepare source...") |
no test coverage detected