mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 12:05:22 +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.
|
# Preprocessing input image or image list.
|
||||||
imgs = self._preprocess_batch_or_single_input(img)
|
imgs = self._preprocess_batch_or_single_input(img)
|
||||||
|
|
||||||
# Batch prediction
|
# Prediction
|
||||||
age_predictions = self.model.predict_on_batch(imgs)
|
age_predictions = self._predict_internal(imgs)
|
||||||
|
|
||||||
# Calculate apparent ages
|
# Calculate apparent ages
|
||||||
apparent_ages = np.array(
|
apparent_ages = np.array(
|
||||||
|
@ -78,8 +78,8 @@ class EmotionClient(Demography):
|
|||||||
# Add channel dimension for grayscale images
|
# Add channel dimension for grayscale images
|
||||||
processed_imgs = np.expand_dims(processed_imgs, axis=-1)
|
processed_imgs = np.expand_dims(processed_imgs, axis=-1)
|
||||||
|
|
||||||
# Batch prediction
|
# Prediction
|
||||||
predictions = self.model.predict_on_batch(processed_imgs)
|
predictions = self._predict_internal(processed_imgs)
|
||||||
|
|
||||||
return predictions
|
return predictions
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ class GenderClient(Demography):
|
|||||||
# Preprocessing input image or image list.
|
# Preprocessing input image or image list.
|
||||||
imgs = self._preprocess_batch_or_single_input(img)
|
imgs = self._preprocess_batch_or_single_input(img)
|
||||||
|
|
||||||
# Batch prediction
|
# Prediction
|
||||||
predictions = self.model.predict_on_batch(imgs)
|
predictions = self._predict_internal(imgs)
|
||||||
|
|
||||||
return predictions
|
return predictions
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ class RaceClient(Demography):
|
|||||||
# Preprocessing input image or image list.
|
# Preprocessing input image or image list.
|
||||||
imgs = self._preprocess_batch_or_single_input(img)
|
imgs = self._preprocess_batch_or_single_input(img)
|
||||||
|
|
||||||
# Batch prediction
|
# Prediction
|
||||||
predictions = self.model.predict_on_batch(imgs)
|
predictions = self._predict_internal(imgs)
|
||||||
|
|
||||||
return predictions
|
return predictions
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user