synthval.features_extraction.InceptionExtractor#
- class synthval.features_extraction.InceptionExtractor(model_id, get_probabilities=False)#
Bases:
FeatureExtractorFeature extractor using traditional Inception models from the timm library (https://huggingface.co/docs/timm/index). Supports batch processing and provides options to extract feature embeddings or class probabilities.
- Parameters:
model_id (str)
get_probabilities (bool)
- batch_feature_extraction(images)#
Extract features (or probabilities) from a batch of images using the Inception model.
- Parameters:
images (List[PIL.Image.Image]) – List of PIL images to extract features from.
- Returns:
A NumPy array where each row corresponds to the feature vector (or probability vector) of an image.
- Return type:
numpy.ndarray