synthval.features_extraction#

Module for feature extraction using various models from HuggingFace, including Rad-Dino, DinoV2, and MambaVision.

This module defines abstract and concrete classes for feature extraction from images, leveraging different pre-trained models available through the HuggingFace library. The module supports extracting features from images using models such as Rad-Dino, DinoV2, and MambaVision, with each extractor providing methods for single and batch feature extraction.

Classes#

FeatureExtractor(abc.ABC)

Abstract base class for defining a feature extractor interface.

RadDinoFeatureExtractor(FeatureExtractor)

Concrete feature extractor using the HuggingFace Rad-Dino model.

DinoV2FeatureExtractor(FeatureExtractor)

Concrete feature extractor using models from the HuggingFace DinoV2 family.

MambaFeatureExtractor(FeatureExtractor)

Concrete feature extractor using models from the HuggingFace MambaVision family.

InceptionExtractor(FeatureExtractor)

Concrete feature extractor using traditional Inception models from the timm library.

Classes#

FeatureExtractor

Abstract base class representing a generic feature extractor.

RadDinoFeatureExtractor

Feature extractor using the HuggingFace model microsoft/rad-dino for extracting features from images.

DinoV2FeatureExtractor

Feature extractor using models from the HuggingFace DinoV2 family

MambaFeatureExtractor

Feature extractor using models from the HuggingFace MambaVision family

InceptionExtractor

Feature extractor using traditional Inception models from the timm library (https://huggingface.co/docs/timm/index).