synthval.features_extraction.MambaFeatureExtractor#
- class synthval.features_extraction.MambaFeatureExtractor(model_id)#
Bases:
FeatureExtractorFeature extractor using models from the HuggingFace MambaVision family (https://huggingface.co/collections/nvidia/mambavision-66943871a6b36c9e78b327d3).
Note: MambaVision models require a CUDA-enabled environment and the installation of specific packages. To use these models as feature extractors, users must have CUDA installed and install the necessary packages by running pip install mambavision.
- Parameters:
model_id (str)
- batch_feature_extraction(images)#
Extract features from a batch of images using the HuggingFace MambaVision 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 of an image.
- Return type:
numpy.ndarray