from __future__ import annotations

from typing import Any, Optional

from paddle.io import Dataset

def has_valid_extension(filename: Any, extensions: Any): ...
def make_dataset(dir: Any, class_to_idx: Any, extensions: Any, is_valid_file: Optional[Any] = ...): ...

class DatasetFolder(Dataset):
    root: Any = ...
    transform: Any = ...
    loader: Any = ...
    extensions: Any = ...
    classes: Any = ...
    class_to_idx: Any = ...
    samples: Any = ...
    targets: Any = ...
    dtype: Any = ...
    def __init__(
        self,
        root: Any,
        loader: Optional[Any] = ...,
        extensions: Optional[Any] = ...,
        transform: Optional[Any] = ...,
        is_valid_file: Optional[Any] = ...,
    ) -> None: ...
    def __getitem__(self, index: Any): ...
    def __len__(self): ...

IMG_EXTENSIONS: Any

def pil_loader(path: Any): ...
def cv2_loader(path: Any): ...
def default_loader(path: Any): ...

class ImageFolder(Dataset):
    root: Any = ...
    loader: Any = ...
    extensions: Any = ...
    samples: Any = ...
    transform: Any = ...
    def __init__(
        self,
        root: Any,
        loader: Optional[Any] = ...,
        extensions: Optional[Any] = ...,
        transform: Optional[Any] = ...,
        is_valid_file: Optional[Any] = ...,
    ): ...
    def __getitem__(self, index: Any): ...
    def __len__(self): ...
