Coverage for src/bob/bio/face/preprocessor/utils.py: 88%

8 statements  

« prev     ^ index     » next       coverage.py v7.6.0, created at 2024-07-13 00:04 +0200

1import bob.bio.base 

2 

3 

4def load_cropper(face_cropper): 

5 if face_cropper is None: 

6 cropper = None 

7 elif isinstance(face_cropper, str): 

8 cropper = bob.bio.base.load_resource(face_cropper, "preprocessor") 

9 else: 

10 cropper = face_cropper 

11 

12 return cropper