Yeongkwon/MNIST-M-flatten
MNIST-M (tabular) A flattened version of Mike0307/MNIST-M for tabular learning (XGBoost, AutoGluon, etc.). Flatten procedure Each row's image (PNG bytes) is decoded with PIL and converted to RGB. The 32x32x3 pixels are flattened in row-major (H, W, C) order into 3072 features. Columns: px_0 ... px_3071 (uint8, 0-255) plus label (int). The original train/test split is preserved: train.csv, test.csv. Restoring an image import pandas as pd, numpy as… See the full description on the dataset page: https://huggingface.co/datasets/Yeongkwon/MNIST-M-flatten.
025
MNIST-M (tabular)
A flattened version of Mike0307/MNIST-M for tabular learning (XGBoost, AutoGluon, etc.).
Flatten procedure
- Each row's
image(PNG bytes) is decoded with PIL and converted to RGB. - The
32x32x3pixels are flattened in row-major (H, W, C) order into3072features. - Columns:
px_0...px_3071(uint8, 0-255) pluslabel(int). - The original train/test split is preserved:
train.csv,test.csv.
Restoring an image
import pandas as pd, numpy as np
from PIL import Image
row = pd.read_csv("train.csv", nrows=1).iloc[0]
arr = row.drop("label").to_numpy(np.uint8).reshape(32, 32, 3)
Image.fromarray(arr)