Add new predictor.

This commit is contained in:
h-alice 2025-01-06 11:51:49 +08:00
parent 5a1881492f
commit 72b94d11de
No known key found for this signature in database
GPG Key ID: 5708F34144A70909
4 changed files with 8 additions and 8 deletions

View File

@ -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(

View File

@ -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

View File

@ -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

View File

@ -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