dataeval.extractors.FlattenExtractor

class dataeval.extractors.FlattenExtractor

Simple NumPy-based feature extractor that flattens images to 1D vectors.

No deep learning framework required. Simply flattens each image to a 1D vector using the flatten_samples utility. This is useful as a baseline or when no model-based feature extraction is needed.

Implements the FeatureExtractor protocol.

Example

>>> from dataeval.extractors import FlattenExtractor
>>> from dataeval import Embeddings
>>>
>>> extractor = FlattenExtractor()
>>> embeddings = Embeddings(train_dataset, extractor=extractor)
>>> result = np.asarray(embeddings)