Dataset Viewer
The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.
FFHQ-512 Processed Chunks (PyTorch Tensors)
This dataset contains 7,000 images sourced from Ryan-sjtu/ffhq512-caption, preprocessed and saved as chunked PyTorch tensor (.pt) files.
Preprocessing Details
Images are preprocessed using a standardized pipeline:
- Color Format: Converted to RGB.
- Resize: Resized to
(512, 512)usingBICUBICinterpolation. - Normalization: Normalized to the range
[-1.0, 1.0]withmean=[0.5, 0.5, 0.5]andstd=[0.5, 0.5, 0.5]. - Tensor Format: Stored as
torch.float32. Each chunk has the shape(chunk_size, 3, 512, 512).
Dataset Structure
- Train: 5,000 images (
train/train_xxxx.pt) - Validation: 1,000 images (
val/val_xxxx.pt) - Test: 1,000 images (
test/test_xxxx.pt)
ffhq_processed_pt/
├── train/
│ ├── train_0000.pt
│ └── ...
├── val/
│ ├── val_0000.pt
│ └── ...
└── test/
├── test_0000.pt
└── ...
Quick Start
1. Download the Dataset
from huggingface_hub import snapshot_download
local_dir = snapshot_download(
repo_id="your_username/your_repo_name",
repo_type="dataset",
local_dir="./ffhq_processed_pt",
)
2. Load Data in PyTorch
import torch
from torch.utils.data import TensorDataset, DataLoader
# Load a single chunk (e.g., 250 images)
tensor_chunk = torch.load("ffhq_processed_pt/train/train_0000.pt")
# Slice a smaller subset (e.g., 50 images) for quick testing/sanity check
small_train = tensor_chunk[:50]
dataset = TensorDataset(small_train)
dataloader = DataLoader(dataset, batch_size=8, shuffle=True)
for (batch,) in dataloader:
print(batch.shape) # torch.Size([8, 3, 512, 512])
break
- Downloads last month
- 84