mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
added review changes
This commit is contained in:
parent
058a0fa590
commit
643ac3dc35
@ -45,7 +45,6 @@ class Buffalo_L(FacialRecognition):
|
||||
|
||||
if not os.path.exists(weights_path):
|
||||
raise FileNotFoundError(f"Model file not found at: {weights_path}")
|
||||
else:
|
||||
logger.debug(f"Model file found at: {weights_path}")
|
||||
|
||||
self.model = get_model(weights_path)
|
||||
@ -65,8 +64,7 @@ class Buffalo_L(FacialRecognition):
|
||||
if len(img.shape) == 3:
|
||||
img = np.expand_dims(img, axis=0) # Convert single image to batch of 1
|
||||
elif len(img.shape) != 4:
|
||||
raise ValueError("Input must have shape (112, 112, 3) or (batch_size, 112, 112, 3).")
|
||||
|
||||
raise ValueError(f"Input must have shape (112, 112, 3) or (X, 112, 112, 3). Got {img.shape}")
|
||||
# Convert RGB to BGR for the entire batch
|
||||
img = img[:, :, :, ::-1]
|
||||
return img
|
||||
|
Loading…
x
Reference in New Issue
Block a user