CoolFace
Datasetpublic

LeTienDat/BTL3_CIFAR-10

CIFAR-10 Feature Representations (BTL3) This dataset contains pre-extracted feature embeddings from the CIFAR-10 dataset, produced using several pretrained image classification models.The goal is to enable fast experimentation, classifier prototyping, and model comparison without needing to train or forward pass large models in Colab. Dataset Source The original CIFAR-10 dataset is MIT-licensed and available here:https://www.cs.toronto.edu/~kriz/cifar.html This… See the full description on the dataset page: https://huggingface.co/datasets/LeTienDat/BTL3_CIFAR-10.

sourceHugging Facecc-by-4.0updated 11mo agoView on Hugging Face
1likes204downloads
Dataset Card

CIFAR-10 Feature Representations (BTL3)

This dataset contains pre-extracted feature embeddings from the CIFAR-10 dataset, produced using several pretrained image classification models. The goal is to enable fast experimentation, classifier prototyping, and model comparison without needing to train or forward pass large models in Colab.


Dataset Source

The original CIFAR-10 dataset is MIT-licensed and available here: https://www.cs.toronto.edu/~kriz/cifar.html

This dataset does not contain the raw images, only derived representation vectors.


Models Used for Feature Extraction

ModelInput SizeLibrary / WeightsFeature RepresentationOutput Dim
ResNet-50224×224torchvision (ResNet50_Weights.IMAGENET1K_V1)Global average pooled2048
VGG-16224×224torchvision (VGG16_Weights.IMAGENET1K_V1)FC6 layer output4096
EfficientNet-B0224×224torchvision (EfficientNet_B0_Weights.IMAGENET1K_V1)Global average pooled1280
ViT-Base/16224×224timm (vit_base_patch16_224)CLS token embedding768
Swin-Base224×224timm (swin_base_patch4_window7_224)Global mean pooled final stage1024

Each model produces a different feature dimensionality depending on its architecture.


File Format

All feature data is stored in compressed `.npz` format:

model_name/
train_features.npz
test_features.npz

Each .npz file contains:

  • `features` → Feature vectors of shape (N, D)
  • `labels` → Corresponding class labels (N,)

Example: If using ResNet-50 → (50000, 2048) for training features.


Loading the Features in Python

python
from huggingface_hub import hf_hub_download
import numpy as np

def load_features(model_name, split="train"):
    file_path = hf_hub_download(
        repo_id="LeTienDat/BTL3_CIFAR-10",
        filename=f"{model_name}/{split}_features.npz"
    )
    data = np.load(file_path)
    return data["features"], data["labels"]

# Example usage
X_train, y_train = load_features("resnet50", "train")
X_test, y_test = load_features("resnet50", "test")

print(X_train.shape, y_train.shape)

License

This dataset is released under the CC-BY 4.0 license.

You are free to:

  • Use
  • Modify
  • Share
  • Publish results

As long as you credit this dataset repository.

Original CIFAR-10 dataset is MIT licensed.


Citation

If you use these features, please cite:

@misc{BTL3_CIFAR10_Features,
  author = {Le Tien Dat},
  title = {BTL3 CIFAR-10 Feature Dataset},
  year = {2025},
  howpublished = {\url{https://huggingface.co/LeTienDat/BTL3_CIFAR-10}}
}