"""
General-Purpose Vision Benchmark Dataset Registry Definitions.

Contains DatasetMetadata for standard computer vision benchmarks (CIFAR-10/100)
at 32x32 native resolution. These datasets demonstrate framework domain-agnosticism
beyond medical and astronomical imaging.
"""

from __future__ import annotations

from typing import Final

from ...paths import DATASET_DIR
from ..base import DatasetMetadata

# CIFAR-10 CLASS LABELS (index-ordered)
_CIFAR10_CLASSES: Final[list[str]] = [
    "airplane",
    "automobile",
    "bird",
    "cat",
    "deer",
    "dog",
    "frog",
    "horse",
    "ship",
    "truck",
]

# CIFAR-100 FINE-GRAINED CLASS LABELS (alphabetical, matching torchvision index order)
_CIFAR100_CLASSES: Final[list[str]] = [
    "apple",
    "aquarium_fish",
    "baby",
    "bear",
    "beaver",
    "bed",
    "bee",
    "beetle",
    "bicycle",
    "bottle",
    "bowl",
    "boy",
    "bridge",
    "bus",
    "butterfly",
    "camel",
    "can",
    "castle",
    "caterpillar",
    "cattle",
    "chair",
    "chimpanzee",
    "clock",
    "cloud",
    "cockroach",
    "couch",
    "crab",
    "crocodile",
    "cup",
    "dinosaur",
    "dolphin",
    "elephant",
    "flatfish",
    "forest",
    "fox",
    "girl",
    "hamster",
    "house",
    "kangaroo",
    "keyboard",
    "lamp",
    "lawn_mower",
    "leopard",
    "lion",
    "lizard",
    "lobster",
    "man",
    "maple_tree",
    "motorcycle",
    "mountain",
    "mouse",
    "mushroom",
    "oak_tree",
    "orange",
    "orchid",
    "otter",
    "palm_tree",
    "pear",
    "pickup_truck",
    "pine_tree",
    "plain",
    "plate",
    "poppy",
    "porcupine",
    "possum",
    "rabbit",
    "raccoon",
    "ray",
    "road",
    "rocket",
    "rose",
    "sea",
    "seal",
    "shark",
    "shrew",
    "skunk",
    "skyscraper",
    "snail",
    "snake",
    "spider",
    "squirrel",
    "streetcar",
    "sunflower",
    "sweet_pepper",
    "table",
    "tank",
    "telephone",
    "television",
    "tiger",
    "tractor",
    "train",
    "trout",
    "tulip",
    "turtle",
    "wardrobe",
    "whale",
    "willow_tree",
    "wolf",
    "woman",
    "worm",
]

# BENCHMARK DATASET REGISTRY (32x32)
REGISTRY_32: Final[dict[str, DatasetMetadata]] = {
    "cifar10": DatasetMetadata(
        name="cifar10",
        display_name="CIFAR-10",
        md5_checksum="",
        url="torchvision",
        path=DATASET_DIR / "cifar10_32.npz",
        classes=_CIFAR10_CLASSES,
        in_channels=3,
        native_resolution=32,
        mean=(0.4914, 0.4822, 0.4465),
        std=(0.2470, 0.2435, 0.2616),
        is_anatomical=False,
        is_texture_based=False,
    ),
    "cifar100": DatasetMetadata(
        name="cifar100",
        display_name="CIFAR-100",
        md5_checksum="",
        url="torchvision",
        path=DATASET_DIR / "cifar100_32.npz",
        classes=_CIFAR100_CLASSES,
        in_channels=3,
        native_resolution=32,
        mean=(0.5071, 0.4867, 0.4408),
        std=(0.2675, 0.2565, 0.2761),
        is_anatomical=False,
        is_texture_based=False,
    ),
}
