mirror of
https://github.com/serengil/deepface.git
synced 2025-06-05 19:15:23 +00:00
Add new predictor.
This commit is contained in:
parent
5a1881492f
commit
72b94d11de
@ -54,8 +54,8 @@ class ApparentAgeClient(Demography):
|
||||
# Preprocessing input image or image list.
|
||||
imgs = self._preprocess_batch_or_single_input(img)
|
||||
|
||||
# Batch prediction
|
||||
age_predictions = self.model.predict_on_batch(imgs)
|
||||
# Prediction
|
||||
age_predictions = self._predict_internal(imgs)
|
||||
|
||||
# Calculate apparent ages
|
||||
apparent_ages = np.array(
|
||||
|
@ -78,8 +78,8 @@ class EmotionClient(Demography):
|
||||
# Add channel dimension for grayscale images
|
||||
processed_imgs = np.expand_dims(processed_imgs, axis=-1)
|
||||
|
||||
# Batch prediction
|
||||
predictions = self.model.predict_on_batch(processed_imgs)
|
||||
# Prediction
|
||||
predictions = self._predict_internal(processed_imgs)
|
||||
|
||||
return predictions
|
||||
|
||||
|
@ -54,8 +54,8 @@ class GenderClient(Demography):
|
||||
# Preprocessing input image or image list.
|
||||
imgs = self._preprocess_batch_or_single_input(img)
|
||||
|
||||
# Batch prediction
|
||||
predictions = self.model.predict_on_batch(imgs)
|
||||
# Prediction
|
||||
predictions = self._predict_internal(imgs)
|
||||
|
||||
return predictions
|
||||
|
||||
|
@ -54,8 +54,8 @@ class RaceClient(Demography):
|
||||
# Preprocessing input image or image list.
|
||||
imgs = self._preprocess_batch_or_single_input(img)
|
||||
|
||||
# Batch prediction
|
||||
predictions = self.model.predict_on_batch(imgs)
|
||||
# Prediction
|
||||
predictions = self._predict_internal(imgs)
|
||||
|
||||
return predictions
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user