id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
18,100
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.RandomOcclusion
import torch import random import torchvision.transforms.functional as F from typing import Callable, List, Optional, Sequence, Tuple, Union class RandomOcclusion(torch.nn.Module): def __init__(self, p: float=0.5, occlusion_px_range: Tuple[int, int]=(50, 100), inplace: bool=False): super().__init__() ...
class RandomOcclusion(torch.nn.Module): def __init__(self, p: float=0.5, occlusion_px_range: Tuple[int, int]=(50, 100), inplace: pass def forward(self, images: T_STEREO_TENSOR, disparities: T_STEREO_TENSOR, masks: T_STEREO_TENSOR) -> Tuple[T_STEREO_TENSOR, Tuple[T_FLOW, T_FLOW], Tuple[T_MASK, T_MASK]...
4
0
14
3
11
0
2
0.09
1
6
0
0
3
4
3
13
48
11
34
19
25
3
26
14
22
4
1
1
7
18,101
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.RandomRescaleAndCrop
import torch import torchvision.transforms.functional as F from typing import Callable, List, Optional, Sequence, Tuple, Union class RandomRescaleAndCrop(torch.nn.Module): def __init__(self, crop_size: Tuple[int, int], scale_range: Tuple[float, float]=(-0.2, 0.5), rescale_prob: float=0.8, scaling_type: str='expon...
class RandomRescaleAndCrop(torch.nn.Module): def __init__(self, crop_size: Tuple[int, int], scale_range: Tuple[float, float]=(-0.2, 0.5), rescale_prob: pass def forward(self, images: T_STEREO_TENSOR, disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> Tuple[T_STEREO_TENSOR, Tuple[T_F...
3
0
51
8
36
7
7
0.34
1
7
1
0
2
6
2
12
114
16
73
36
58
25
54
24
51
11
1
4
13
18,102
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.RandomSpatialShift
import torch import torchvision.transforms.functional as F from typing import Callable, List, Optional, Sequence, Tuple, Union class RandomSpatialShift(torch.nn.Module): def __init__(self, p: float=0.5, max_angle: float=0.1, max_px_shift: int=2, interpolation_type: str='bilinear') -> None: super().__init_...
class RandomSpatialShift(torch.nn.Module): def __init__(self, p: float=0.5, max_angle: float=0.1, max_px_shift: int=2, interpolation_type: str='bilinear') -> None: pass def forward(self, images: T_STEREO_TENSOR, disparities: T_STEREO_TENSOR, masks: T_STEREO_TENSOR) -> Tuple[T_STEREO_TENSOR, Tuple[T_F...
3
0
20
2
16
3
2
0.22
1
5
1
0
2
4
2
12
42
4
32
20
22
7
17
13
14
2
1
1
3
18,103
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.Resize
import torch from typing import Callable, List, Optional, Sequence, Tuple, Union import torchvision.transforms.functional as F class Resize(torch.nn.Module): def __init__(self, resize_size: Tuple[int, ...], interpolation_type: str='bilinear') -> None: super().__init__() self.resize_size = list(res...
class Resize(torch.nn.Module): def __init__(self, resize_size: Tuple[int, ...], interpolation_type: str='bilinear') -> None: pass def forward(self, images: T_STEREO_TENSOR, disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> Tuple[T_STEREO_TENSOR, Tuple[T_FLOW, T_FLOW], Tuple[T_MASK,...
3
0
23
3
17
4
4
0.2
1
6
2
0
2
2
2
12
47
6
35
18
27
7
22
13
19
6
1
2
7
18,104
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.ToGPU
import torch from typing import Callable, List, Optional, Sequence, Tuple, Union class ToGPU(torch.nn.Module): def __init__(self) -> None: super().__init__() def forward(self, images: T_STEREO_TENSOR, disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> Tuple[T_STEREO_TENSOR, Tuple[T_...
class ToGPU(torch.nn.Module): def __init__(self) -> None: pass def forward(self, images: T_STEREO_TENSOR, disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> Tuple[T_STEREO_TENSOR, Tuple[T_FLOW, T_FLOW], Tuple[T_MASK, T_MASK]]: pass
3
0
6
0
6
0
1
0
1
3
0
0
2
0
2
12
14
1
13
11
5
0
8
6
5
1
1
0
2
18,105
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.ToTensor
import torch from typing import Callable, List, Optional, Sequence, Tuple, Union import PIL.Image import torchvision.transforms.functional as F class ToTensor(torch.nn.Module): def forward(self, images: Tuple[PIL.Image.Image, PIL.Image.Image], disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> T...
class ToTensor(torch.nn.Module): def forward(self, images: Tuple[PIL.Image.Image, PIL.Image.Image], disparities: Tuple[T_FLOW, T_FLOW], masks: Tuple[T_MASK, T_MASK]) -> Tuple[T_STEREO_TENSOR, Tuple[T_FLOW, T_FLOW], Tuple[T_MASK, T_MASK]]: pass
2
0
21
3
18
0
6
0
1
2
0
0
1
0
1
11
22
3
19
12
12
0
14
7
12
6
1
1
6
18,106
pytorch/vision
pytorch_vision/references/depth/stereo/transforms.py
stereo.transforms.ValidateModelInput
import torch class ValidateModelInput(torch.nn.Module): def forward(self, images: T_STEREO_TENSOR, disparities: T_FLOW, masks: T_MASK): if images[0].shape != images[1].shape: raise ValueError('img1 and img2 should have the same shape.') h, w = images[0].shape[-2:] if disparitie...
class ValidateModelInput(torch.nn.Module): def forward(self, images: T_STEREO_TENSOR, disparities: T_FLOW, masks: T_MASK): pass
2
0
13
1
12
0
6
0.08
1
3
0
0
1
0
1
11
15
1
13
3
11
1
13
3
11
6
1
2
6
18,107
pytorch/vision
pytorch_vision/references/depth/stereo/utils/logger.py
stereo.utils.logger.MetricLogger
from collections import defaultdict, deque import torch import datetime import time class MetricLogger: def __init__(self, delimiter='\t'): self.meters = defaultdict(SmoothedValue) self.delimiter = delimiter def update(self, **kwargs): for k, v in kwargs.items(): if isinst...
class MetricLogger: def __init__(self, delimiter='\t'): pass def update(self, **kwargs): pass def __getattr__(self, attr): pass def __str__(self): pass def synchronize_between_processes(self): pass def add_meter(self, name, **kwargs): pass ...
8
0
12
0
12
0
3
0
0
9
1
0
7
2
7
7
91
6
85
27
77
0
55
27
47
6
0
3
19
18,108
pytorch/vision
pytorch_vision/references/depth/stereo/utils/logger.py
stereo.utils.logger.SmoothedValue
from .distributed import reduce_across_processes from collections import defaultdict, deque import torch class SmoothedValue: """Track a series of values and provide access to smoothed values over a window or the global series average. """ def __init__(self, window_size=20, fmt='{median:.4f} ({global_...
class SmoothedValue: '''Track a series of values and provide access to smoothed values over a window or the global series average. ''' def __init__(self, window_size=20, fmt='{median:.4f} ({global_avg:.4f})'): pass def update(self, value, n=1): pass def synchronize_between_pr...
15
2
4
0
3
0
1
0.17
0
2
0
0
9
4
9
9
51
9
36
22
21
6
29
17
19
1
0
0
9
18,109
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.FlowPhotoMetricLoss
from torch import nn, Tensor from typing import List, Optional import torch from torchvision.prototype.models.depth.stereo.raft_stereo import grid_sample, make_coords_grid class FlowPhotoMetricLoss(nn.Module): def __init__(self, ssim_weight: float=0.85, ssim_window_size: int=11, ssim_max_val: float=1.0, ssim_sigm...
class FlowPhotoMetricLoss(nn.Module): def __init__(self, ssim_weight: float=0.85, ssim_window_size: int=11, ssim_max_val: float=1.0, ssim_sigma: float=1.5, ssim_eps: float=1e-12, ssim_use_padding: bool=True, max_displacement_ratio: float=0.15) -> None: pass def forward(self, source: Tensor, reference...
3
1
45
6
34
6
2
0.16
1
8
1
0
2
4
2
12
91
12
68
34
50
11
30
19
27
3
1
1
4
18,110
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.FlowSequenceConsistencyLoss
from typing import List, Optional from torch import nn, Tensor class FlowSequenceConsistencyLoss(nn.Module): def __init__(self, gamma: float=0.8, resize_factor: float=0.25, rescale_factor: float=0.25, rescale_mode: str='bilinear') -> None: super().__init__() self.gamma = gamma self.resize_...
class FlowSequenceConsistencyLoss(nn.Module): def __init__(self, gamma: float=0.8, resize_factor: float=0.25, rescale_factor: float=0.25, rescale_mode: str='bilinear') -> None: pass def forward(self, flow_preds: List[Tensor]) -> Tensor: ''' Args: flow_preds: list of tensor...
4
1
12
0
9
2
1
0.25
1
4
0
0
3
5
3
13
38
3
28
16
18
7
15
10
11
1
1
0
3
18,111
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.PSNRLoss
from torch import nn, Tensor class PSNRLoss(nn.Module): def __init__(self, max_val: float=256) -> None: """ Args: max_val: maximum value of the input tensor. This refers to the maximum domain value of the input tensor. """ super().__init__() self.max_val = max_...
class PSNRLoss(nn.Module): def __init__(self, max_val: float=256) -> None: ''' Args: max_val: maximum value of the input tensor. This refers to the maximum domain value of the input tensor. ''' pass def forward(self, source: Tensor, target: Tensor) -> Tensor: ...
3
2
10
2
3
6
1
2
1
3
0
0
2
1
2
12
22
4
6
4
3
12
6
4
3
1
1
0
2
18,112
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.SSIM
import torch from torch import nn, Tensor class SSIM(nn.Module): def __init__(self, kernel_size: int=11, max_val: float=1.0, sigma: float=1.5, eps: float=1e-12, use_padding: bool=True) -> None: """SSIM loss function. Args: kernel_size: size of the Gaussian kernel max_val: ...
class SSIM(nn.Module): def __init__(self, kernel_size: int=11, max_val: float=1.0, sigma: float=1.5, eps: float=1e-12, use_padding: bool=True) -> None: '''SSIM loss function. Args: kernel_size: size of the Gaussian kernel max_val: constant scaling factor sigma: ...
3
2
25
3
14
8
1
0.52
1
5
0
0
2
8
2
12
51
7
29
19
19
15
14
11
11
1
1
0
2
18,113
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.SequenceLoss
from torch import nn, Tensor from typing import List, Optional import torch class SequenceLoss(nn.Module): def __init__(self, gamma: float=0.8, max_flow: int=256, exclude_large_flows: bool=False) -> None: """ Args: gamma: value for the exponential weighting of the loss across frames ...
class SequenceLoss(nn.Module): def __init__(self, gamma: float=0.8, max_flow: int=256, exclude_large_flows: bool=False) -> None: ''' Args: gamma: value for the exponential weighting of the loss across frames max_flow: maximum flow value to exclude exclude_large_...
4
2
10
0
5
5
1
0.88
1
5
0
0
3
3
3
13
33
3
16
8
12
14
14
8
10
1
1
0
3
18,114
pytorch/vision
pytorch_vision/references/depth/stereo/utils/losses.py
stereo.utils.losses.SmoothnessLoss
import torch from torch.nn import functional as F from torch import nn, Tensor class SmoothnessLoss(nn.Module): def __init__(self) -> None: super().__init__() def _x_gradient(self, img: Tensor) -> Tensor: if img.ndim > 4: original_shape = img.shape is_reshaped = True ...
class SmoothnessLoss(nn.Module): def __init__(self) -> None: pass def _x_gradient(self, img: Tensor) -> Tensor: pass def _y_gradient(self, x: torch.Tensor) -> torch.Tensor: pass def forward(self, images: Tensor, vals: Tensor) -> Tensor: ''' Args: ...
5
1
11
1
8
2
2
0.21
1
2
0
0
4
0
4
14
48
8
33
17
28
7
31
17
26
3
1
1
8
18,115
pytorch/vision
pytorch_vision/torchvision/_utils.py
torchvision._utils.StrEnum
import enum class StrEnum(enum.Enum, metaclass=StrEnumMeta): pass
class StrEnum(enum.Enum, metaclass=StrEnumMeta): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
50
2
0
2
1
1
0
2
1
1
0
4
0
0
18,116
pytorch/vision
pytorch_vision/torchvision/_utils.py
torchvision._utils.StrEnumMeta
import enum class StrEnumMeta(enum.EnumMeta): auto = enum.auto def from_str(self: type[T], member: str) -> T: try: return self[member] except KeyError: raise ValueError(f"Unknown value '{member}' for {self.__name__}.") from None
class StrEnumMeta(enum.EnumMeta): def from_str(self: type[T], member: str) -> T: pass
2
0
7
0
5
3
2
0.43
1
3
0
1
1
0
1
1
10
1
7
3
5
3
7
3
5
2
1
1
2
18,117
pytorch/vision
pytorch_vision/torchvision/datasets/FakeData.py
torchvision.datasets.FakeData.FakeData
from .. import transforms import torch from .vision import VisionDataset from typing import Any, Callable, Optional class FakeData(VisionDataset): """A fake dataset that returns randomly generated images and returns them as PIL images Args: size (int, optional): Size of the dataset. Default: 1000 imag...
class FakeData(VisionDataset): '''A fake dataset that returns randomly generated images and returns them as PIL images Args: size (int, optional): Size of the dataset. Default: 1000 images image_size(tuple, optional): Size of the returned images. Default: (3, 224, 224) num_classes(int, ...
4
2
14
1
10
3
2
0.65
1
4
0
0
3
4
3
13
59
8
31
19
19
20
23
11
19
4
3
1
6
18,118
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.FlowDataset
from pathlib import Path from abc import ABC, abstractmethod from .folder import default_loader import torch from typing import Any, Callable, Optional, Union from .vision import VisionDataset from PIL import Image class FlowDataset(ABC, VisionDataset): _has_builtin_flow_mask = False def __init__(self, root: ...
class FlowDataset(ABC, VisionDataset): def __init__(self, root: Union[str, Path], transforms: Optional[Callable]=None, loader: Callable[[str], Any]=default_loader) -> None: pass def _read_img(self, file_name: str) -> Union[Image.Image, torch.Tensor]: pass @abstractmethod def _read_flo...
8
0
7
1
6
1
2
0.19
2
5
0
5
6
3
6
36
53
12
36
17
28
7
32
16
25
5
4
2
11
18,119
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.FlyingChairs
import os from pathlib import Path from typing import Any, Callable, Optional, Union from glob import glob from .utils import _read_pfm, verify_str_arg import numpy as np class FlyingChairs(FlowDataset): """`FlyingChairs <https://lmb.informatik.uni-freiburg.de/resources/datasets/FlyingChairs.en.html#flyingchairs>`...
class FlyingChairs(FlowDataset): '''`FlyingChairs <https://lmb.informatik.uni-freiburg.de/resources/datasets/FlyingChairs.en.html#flyingchairs>`_ Dataset for optical flow. You will also need to download the FlyingChairs_train_val.txt file from the dataset page. The dataset is expected to have the following...
4
2
13
2
7
3
2
1.32
1
6
0
0
3
0
3
39
66
15
22
10
18
29
20
10
16
4
5
2
6
18,120
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.FlyingThings3D
from pathlib import Path import itertools import numpy as np from .folder import default_loader from .utils import _read_pfm, verify_str_arg from typing import Any, Callable, Optional, Union from glob import glob class FlyingThings3D(FlowDataset): """`FlyingThings3D <https://lmb.informatik.uni-freiburg.de/resource...
null
4
2
22
3
15
3
3
0.74
1
8
0
0
3
0
3
39
96
16
46
20
35
34
31
13
27
8
5
4
10
18,121
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.HD1K
from pathlib import Path import numpy as np from .folder import default_loader from glob import glob from .utils import _read_pfm, verify_str_arg from typing import Any, Callable, Optional, Union class HD1K(FlowDataset): """`HD1K <http://hci-benchmark.iwr.uni-heidelberg.de/>`__ dataset for optical flow. The d...
class HD1K(FlowDataset): '''`HD1K <http://hci-benchmark.iwr.uni-heidelberg.de/>`__ dataset for optical flow. The dataset is expected to have the following structure: :: root hd1k hd1k_challenge image_2 hd1k_flow_gt flow...
4
2
13
2
8
4
3
1.04
1
7
0
0
3
0
3
39
65
12
26
12
22
27
23
12
19
6
5
3
8
18,122
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.KittiFlow
from .folder import default_loader from .utils import _read_pfm, verify_str_arg from typing import Any, Callable, Optional, Union from glob import glob from pathlib import Path import numpy as np class KittiFlow(FlowDataset): """`KITTI <http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php?benchmark=flow>`__ da...
class KittiFlow(FlowDataset): '''`KITTI <http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php?benchmark=flow>`__ dataset for optical flow (2015). The dataset is expected to have the following structure: :: root KittiFlow testing image_2 ...
4
2
12
2
6
3
2
1.25
1
6
0
0
3
1
3
39
59
14
20
9
16
25
18
9
14
4
5
1
6
18,123
pytorch/vision
pytorch_vision/torchvision/datasets/_optical_flow.py
torchvision.datasets._optical_flow.Sintel
import numpy as np from typing import Any, Callable, Optional, Union from glob import glob from pathlib import Path import os from .utils import _read_pfm, verify_str_arg from .folder import default_loader class Sintel(FlowDataset): """`Sintel <http://sintel.is.tue.mpg.de/>`_ Dataset for optical flow. The dat...
null
4
2
14
2
9
3
3
1.7
1
5
0
0
3
0
3
39
85
12
27
17
17
46
21
11
17
7
5
3
9
18,124
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.CREStereo
from PIL import Image from pathlib import Path from typing import Callable, cast, Optional, Union import numpy as np class CREStereo(StereoMatchingDataset): """Synthetic dataset used in training the `CREStereo <https://arxiv.org/pdf/2203.11483.pdf>`_ architecture. Dataset details on the official paper `repo <h...
class CREStereo(StereoMatchingDataset): '''Synthetic dataset used in training the `CREStereo <https://arxiv.org/pdf/2203.11483.pdf>`_ architecture. Dataset details on the official paper `repo <https://github.com/megvii-research/CREStereo>`_. The dataset is expected to have the following structure: :: ...
4
2
13
2
8
3
1
1.81
1
4
0
0
3
0
3
39
86
13
26
19
18
47
22
15
18
2
5
1
4
18,125
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.CarlaStereo
from typing import Callable, cast, Optional, Union from pathlib import Path import numpy as np class CarlaStereo(StereoMatchingDataset): """ Carla simulator data linked in the `CREStereo github repo <https://github.com/megvii-research/CREStereo>`_. The dataset is expected to have the following structure: ...
class CarlaStereo(StereoMatchingDataset): ''' Carla simulator data linked in the `CREStereo github repo <https://github.com/megvii-research/CREStereo>`_. The dataset is expected to have the following structure: :: root carla-highres trainingF scene1 ...
4
2
11
2
6
3
1
1.74
1
4
0
0
3
2
3
39
62
11
19
14
15
33
19
14
15
1
5
0
3
18,126
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.ETH3DStereo
from PIL import Image from .utils import _read_pfm, download_and_extract_archive, verify_str_arg import numpy as np from typing import Callable, cast, Optional, Union from pathlib import Path class ETH3DStereo(StereoMatchingDataset): """ETH3D `Low-Res Two-View <https://www.eth3d.net/datasets>`_ dataset. The d...
class ETH3DStereo(StereoMatchingDataset): '''ETH3D `Low-Res Two-View <https://www.eth3d.net/datasets>`_ dataset. The dataset is expected to have the following structure: :: root ETH3D two_view_training scene1 im1.png ...
4
2
15
3
8
4
2
2.11
1
6
0
0
3
2
3
39
98
15
27
15
23
57
26
15
22
3
5
1
6
18,127
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.FallingThingsStereo
import json import numpy as np from .utils import _read_pfm, download_and_extract_archive, verify_str_arg from pathlib import Path from PIL import Image from typing import Callable, cast, Optional, Union class FallingThingsStereo(StereoMatchingDataset): """`FallingThings <https://research.nvidia.com/publication/20...
class FallingThingsStereo(StereoMatchingDataset): '''`FallingThings <https://research.nvidia.com/publication/2018-06_falling-things-synthetic-dataset-3d-object-detection-and-pose-estimation>`_ dataset. The dataset is expected to have the following structure: :: root FallingThings ...
4
2
18
3
11
5
1
1.62
1
4
0
0
3
0
3
39
102
14
34
19
30
55
27
18
23
2
5
1
4
18,128
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.InStereo2k
from PIL import Image from .utils import _read_pfm, download_and_extract_archive, verify_str_arg from pathlib import Path from typing import Callable, cast, Optional, Union import numpy as np class InStereo2k(StereoMatchingDataset): """`InStereo2k <https://github.com/YuhuaXu/StereoDataset>`_ dataset. The data...
class InStereo2k(StereoMatchingDataset): '''`InStereo2k <https://github.com/YuhuaXu/StereoDataset>`_ dataset. The dataset is expected to have the following structure: :: root InStereo2k train scene1 left.png ...
4
2
11
2
6
3
1
2.06
1
4
0
0
3
2
3
39
67
12
18
12
14
37
18
12
14
1
5
0
3
18,129
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.Kitti2012Stereo
import numpy as np from pathlib import Path from PIL import Image from typing import Callable, cast, Optional, Union from .utils import _read_pfm, download_and_extract_archive, verify_str_arg class Kitti2012Stereo(StereoMatchingDataset): """ KITTI dataset from the `2012 stereo evaluation benchmark <http://www....
class Kitti2012Stereo(StereoMatchingDataset): ''' KITTI dataset from the `2012 stereo evaluation benchmark <http://www.cvlibs.net/datasets/kitti/eval_stereo_flow.php>`_. Uses the RGB images for consistency with KITTI 2015. The dataset is expected to have the following structure: :: root ...
4
2
13
2
7
4
2
2
1
5
0
0
3
2
3
39
83
14
23
13
19
46
22
12
18
2
5
1
5
18,130
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.Kitti2015Stereo
from .utils import _read_pfm, download_and_extract_archive, verify_str_arg import numpy as np from typing import Callable, cast, Optional, Union from PIL import Image from pathlib import Path class Kitti2015Stereo(StereoMatchingDataset): """ KITTI dataset from the `2015 stereo evaluation benchmark <http://www....
class Kitti2015Stereo(StereoMatchingDataset): ''' KITTI dataset from the `2015 stereo evaluation benchmark <http://www.cvlibs.net/datasets/kitti/eval_scene_flow.php>`_. The dataset is expected to have the following structure: :: root Kitti2015 testing ...
4
2
13
2
7
4
2
2.04
1
5
0
0
3
2
3
39
86
13
24
14
20
49
23
13
19
2
5
1
5
18,131
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.Middlebury2014Stereo
import os import random from pathlib import Path from .utils import _read_pfm, download_and_extract_archive, verify_str_arg from typing import Callable, cast, Optional, Union import numpy as np import shutil from PIL import Image class Middlebury2014Stereo(StereoMatchingDataset): """Publicly available scenes from ...
class Middlebury2014Stereo(StereoMatchingDataset): '''Publicly available scenes from the Middlebury dataset `2014 version <https://vision.middlebury.edu/stereo/data/scenes2014/>`. The dataset mostly follows the original format, without containing the ambient subdirectories. : :: root Middl...
6
3
29
3
20
6
5
0.55
1
9
0
0
5
3
5
41
254
27
150
42
136
83
77
34
71
9
5
4
23
18,132
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.SceneFlowStereo
from pathlib import Path import numpy as np from .utils import _read_pfm, download_and_extract_archive, verify_str_arg from typing import Callable, cast, Optional, Union class SceneFlowStereo(StereoMatchingDataset): """Dataset interface for `Scene Flow <https://lmb.informatik.uni-freiburg.de/resources/datasets/Sce...
null
4
2
18
3
12
3
1
1.57
1
4
0
0
3
0
3
39
110
16
37
19
27
58
23
13
19
2
5
1
4
18,133
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.SintelStereo
from .utils import _read_pfm, download_and_extract_archive, verify_str_arg import os import numpy as np from typing import Callable, cast, Optional, Union from PIL import Image from pathlib import Path class SintelStereo(StereoMatchingDataset): """Sintel `Stereo Dataset <http://sintel.is.tue.mpg.de/stereo>`_. ...
null
5
2
18
3
10
5
2
1.35
1
5
0
0
4
0
4
40
120
19
43
22
38
58
39
22
34
3
5
1
8
18,134
pytorch/vision
pytorch_vision/torchvision/datasets/_stereo_matching.py
torchvision.datasets._stereo_matching.StereoMatchingDataset
import numpy as np from glob import glob from PIL import Image from typing import Callable, cast, Optional, Union from .vision import VisionDataset from pathlib import Path from abc import ABC, abstractmethod class StereoMatchingDataset(ABC, VisionDataset): """Base interface for Stereo matching datasets""" _ha...
class StereoMatchingDataset(ABC, VisionDataset): '''Base interface for Stereo matching datasets''' def __init__(self, root: Union[str, Path], transforms: Optional[Callable]=None) -> None: ''' Args: root(str): Root directory of the dataset. transforms(callable, optional)...
8
3
17
2
9
6
2
0.62
2
8
0
10
6
3
6
36
111
20
58
27
46
36
43
21
36
5
4
1
13
18,135
pytorch/vision
pytorch_vision/torchvision/datasets/caltech.py
torchvision.datasets.caltech.Caltech101
from PIL import Image from .vision import VisionDataset from typing import Any, Callable, Optional, Union import shutil from pathlib import Path import os import os.path from .utils import download_and_extract_archive, extract_archive, verify_str_arg class Caltech101(VisionDataset): """`Caltech 101 <https://data.c...
class Caltech101(VisionDataset): '''`Caltech 101 <https://data.caltech.edu/records/20086>`_ Dataset. .. warning:: This class needs `scipy <https://docs.scipy.org/doc/>`_ to load target files from `.mat` format. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ...
7
2
18
2
14
2
3
0.38
1
12
0
0
6
6
6
16
138
23
84
28
69
32
47
20
39
7
3
2
17
18,136
pytorch/vision
pytorch_vision/torchvision/datasets/caltech.py
torchvision.datasets.caltech.Caltech256
import os.path from PIL import Image import os from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive, extract_archive, verify_str_arg from .vision import VisionDataset class Caltech256(VisionDataset): """`Caltech 256 <https://data.caltech.edu/records/20087>`_ Dataset. ...
class Caltech256(VisionDataset): '''`Caltech 256 <https://data.caltech.edu/records/20087>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``caltech256`` exists or will be saved to if download is set to True. transform (callable, optional): ...
6
2
14
2
11
1
2
0.35
1
8
0
0
5
4
5
15
89
15
55
20
43
19
31
13
25
4
3
1
11
18,137
pytorch/vision
pytorch_vision/torchvision/datasets/celeba.py
torchvision.datasets.celeba.CelebA
import csv from pathlib import Path import os from .utils import check_integrity, download_file_from_google_drive, extract_archive, verify_str_arg from typing import Any, Callable, Optional, Union import torch import PIL from .vision import VisionDataset class CelebA(VisionDataset): """`Large-scale CelebFaces Attr...
class CelebA(VisionDataset): '''`Large-scale CelebFaces Attributes (CelebA) Dataset <http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory where images are downloaded to. split (string): One of {'train', 'valid', 'test', 'all'}. ...
8
1
18
2
14
1
4
0.34
1
12
0
0
7
8
7
17
178
31
111
51
91
38
79
38
71
10
3
2
27
18,138
pytorch/vision
pytorch_vision/torchvision/datasets/cifar.py
torchvision.datasets.cifar.CIFAR10
from typing import Any, Callable, Optional, Union from pathlib import Path import pickle import numpy as np from PIL import Image from .vision import VisionDataset from .utils import check_integrity, download_and_extract_archive import os.path class CIFAR10(VisionDataset): """`CIFAR10 <https://www.cs.toronto.edu/~...
class CIFAR10(VisionDataset): '''`CIFAR10 <https://www.cs.toronto.edu/~kriz/cifar.html>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``cifar-10-batches-py`` exists or will be saved to if download is set to True. train (bool, optional): I...
8
2
12
2
9
2
3
0.3
1
8
0
1
7
6
7
17
131
25
83
40
68
25
62
30
54
6
3
3
19
18,139
pytorch/vision
pytorch_vision/torchvision/datasets/cifar.py
torchvision.datasets.cifar.CIFAR100
class CIFAR100(CIFAR10): """`CIFAR100 <https://www.cs.toronto.edu/~kriz/cifar.html>`_ Dataset. This is a subclass of the `CIFAR10` Dataset. """ base_folder = 'cifar-100-python' url = 'https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz' filename = 'cifar-100-python.tar.gz' tgz_md5 = 'e...
class CIFAR100(CIFAR10): '''`CIFAR100 <https://www.cs.toronto.edu/~kriz/cifar.html>`_ Dataset. This is a subclass of the `CIFAR10` Dataset. ''' pass
1
1
0
0
0
0
0
0.19
1
0
0
0
0
0
0
17
22
3
16
8
15
3
8
8
7
0
4
0
0
18,140
pytorch/vision
pytorch_vision/torchvision/datasets/cityscapes.py
torchvision.datasets.cityscapes.Cityscapes
import os import json from collections import namedtuple from .vision import VisionDataset from .utils import extract_archive, iterable_to_str, verify_str_arg from typing import Any, Callable, Optional, Union from pathlib import Path from PIL import Image class Cityscapes(VisionDataset): """`Cityscapes <http://www...
class Cityscapes(VisionDataset): '''`Cityscapes <http://www.cityscapes-dataset.com/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``leftImg8bit`` and ``gtFine`` or ``gtCoarse`` are located. split (string, optional): The image split to us...
7
2
19
2
15
2
4
0.31
1
9
0
0
6
7
6
16
210
36
134
43
118
42
70
33
63
12
3
3
24
18,141
pytorch/vision
pytorch_vision/torchvision/datasets/clevr.py
torchvision.datasets.clevr.CLEVRClassification
from .folder import default_loader from urllib.parse import urlparse import pathlib import json from .utils import download_and_extract_archive, verify_str_arg from typing import Any, Callable, Optional, Union from .vision import VisionDataset class CLEVRClassification(VisionDataset): """`CLEVR <https://cs.stanfor...
class CLEVRClassification(VisionDataset): '''`CLEVR <https://cs.stanford.edu/people/jcjohns/clevr/>`_ classification dataset. The number of objects in a scene are used as label. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``root/clevr`` exists or will be saved t...
7
1
9
2
7
0
2
0.26
1
7
0
0
6
5
6
16
77
18
47
27
33
12
39
19
32
4
3
2
12
18,142
pytorch/vision
pytorch_vision/torchvision/datasets/coco.py
torchvision.datasets.coco.CocoCaptions
class CocoCaptions(CocoDetection): """`MS Coco Captions <https://cocodataset.org/#captions-2015>`_ Dataset. It requires `pycocotools <https://github.com/ppwwyyxx/cocoapi>`_ to be installed, which could be installed via ``pip install pycocotools`` or ``conda install conda-forge::pycocotools``. Args: ...
class CocoCaptions(CocoDetection): '''`MS Coco Captions <https://cocodataset.org/#captions-2015>`_ Dataset. It requires `pycocotools <https://github.com/ppwwyyxx/cocoapi>`_ to be installed, which could be installed via ``pip install pycocotools`` or ``conda install conda-forge::pycocotools``. Args: ...
2
1
2
0
2
0
1
10.33
1
3
0
0
1
0
1
16
45
11
3
2
1
31
3
2
1
1
4
0
1
18,143
pytorch/vision
pytorch_vision/torchvision/datasets/coco.py
torchvision.datasets.coco.CocoDetection
import os.path from typing import Any, Callable, Optional, Union from pathlib import Path from PIL import Image from .vision import VisionDataset class CocoDetection(VisionDataset): """`MS Coco Detection <https://cocodataset.org/#detection-2016>`_ Dataset. It requires `pycocotools <https://github.com/ppwwyyxx...
class CocoDetection(VisionDataset): '''`MS Coco Detection <https://cocodataset.org/#detection-2016>`_ Dataset. It requires `pycocotools <https://github.com/ppwwyyxx/cocoapi>`_ to be installed, which could be installed via ``pip install pycocotools`` or ``conda install conda-forge::pycocotools``. Args: ...
6
1
7
1
6
0
1
0.41
1
8
0
2
5
2
5
15
53
12
29
19
15
12
22
12
15
3
3
1
7
18,144
pytorch/vision
pytorch_vision/torchvision/datasets/country211.py
torchvision.datasets.country211.Country211
from .folder import default_loader, ImageFolder from pathlib import Path from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive, verify_str_arg class Country211(ImageFolder): """`The Country211 Data Set <https://github.com/openai/CLIP/blob/main/data/country211.md>`_ from ...
class Country211(ImageFolder): '''`The Country211 Data Set <https://github.com/openai/CLIP/blob/main/data/country211.md>`_ from OpenAI. This dataset was built by filtering the images from the YFCC100m dataset that have GPS coordinate corresponding to a ISO-3166 country code. The dataset is balanced by ...
4
1
9
1
8
0
2
0.52
1
5
0
0
3
3
3
19
51
10
27
16
16
14
20
9
16
3
5
1
6
18,145
pytorch/vision
pytorch_vision/torchvision/datasets/dtd.py
torchvision.datasets.dtd.DTD
import os from .folder import default_loader from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive, verify_str_arg from .vision import VisionDataset import pathlib class DTD(VisionDataset): """`Describable Textures Dataset (DTD) <https://www.robots.ox.ac.uk/~vgg/data/dtd...
class DTD(VisionDataset): '''`Describable Textures Dataset (DTD) <https://www.robots.ox.ac.uk/~vgg/data/dtd/>`_. Args: root (str or ``pathlib.Path``): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. pa...
7
1
10
1
9
0
2
0.27
1
13
0
0
6
10
6
16
90
19
56
33
41
15
45
24
38
5
3
2
13
18,146
pytorch/vision
pytorch_vision/torchvision/datasets/eurosat.py
torchvision.datasets.eurosat.EuroSAT
from .folder import default_loader, ImageFolder from typing import Any, Callable, Optional, Union import os from .utils import download_and_extract_archive from pathlib import Path class EuroSAT(ImageFolder): """RGB version of the `EuroSAT <https://github.com/phelber/eurosat>`_ Dataset. For the MS version of ...
class EuroSAT(ImageFolder): '''RGB version of the `EuroSAT <https://github.com/phelber/eurosat>`_ Dataset. For the MS version of the dataset, see `TorchGeo <https://torchgeo.readthedocs.io/en/stable/api/datasets.html#eurosat>`__. Args: root (str or ``pathlib.Path``): Root directory of dataset w...
5
1
9
1
7
0
2
0.43
1
6
0
0
4
3
4
20
54
11
30
14
19
13
20
8
15
3
5
1
7
18,147
pytorch/vision
pytorch_vision/torchvision/datasets/fakedata.py
torchvision.datasets.fakedata.FakeData
import torch from .vision import VisionDataset from .. import transforms from typing import Any, Callable, Optional class FakeData(VisionDataset): """A fake dataset that returns randomly generated images and returns them as PIL images Args: size (int, optional): Size of the dataset. Default: 1000 imag...
class FakeData(VisionDataset): '''A fake dataset that returns randomly generated images and returns them as PIL images Args: size (int, optional): Size of the dataset. Default: 1000 images image_size(tuple, optional): Size of the returned images. Default: (3, 224, 224) num_classes(int, ...
4
2
14
1
10
3
2
0.65
1
4
0
1
3
4
3
13
59
8
31
19
19
20
23
11
19
4
3
1
6
18,148
pytorch/vision
pytorch_vision/torchvision/datasets/fer2013.py
torchvision.datasets.fer2013.FER2013
from PIL import Image from .vision import VisionDataset import csv from typing import Any, Callable, Optional, Union from .utils import check_integrity, verify_str_arg import torch import pathlib class FER2013(VisionDataset): """`FER2013 <https://www.kaggle.com/c/challenges-in-representation-learning-facial-ex...
class FER2013(VisionDataset): '''`FER2013 <https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge>`_ Dataset. .. note:: This dataset can return test labels only if ``fer2013.csv`` OR ``icml_face_data.csv`` are present in ``root/fer2013/``. If ...
7
1
11
2
9
0
3
0.7
1
7
0
0
4
2
4
14
109
17
54
28
41
38
38
21
31
8
3
2
16
18,149
pytorch/vision
pytorch_vision/torchvision/datasets/fgvc_aircraft.py
torchvision.datasets.fgvc_aircraft.FGVCAircraft
from .vision import VisionDataset from typing import Any, Callable from .folder import default_loader import os from pathlib import Path from .utils import download_and_extract_archive, verify_str_arg class FGVCAircraft(VisionDataset): """`FGVC Aircraft <https://www.robots.ox.ac.uk/~vgg/data/fgvc-aircraft/>`_ Data...
class FGVCAircraft(VisionDataset): '''`FGVC Aircraft <https://www.robots.ox.ac.uk/~vgg/data/fgvc-aircraft/>`_ Dataset. The dataset contains 10,000 images of aircraft, with 100 images for each of 100 different aircraft model variants, most of which are airplanes. Aircraft models are organized in a three...
6
2
14
2
11
1
2
0.45
1
10
0
0
5
7
5
15
103
19
58
29
44
26
40
20
34
4
3
2
11
18,150
pytorch/vision
pytorch_vision/torchvision/datasets/flickr.py
torchvision.datasets.flickr.Flickr30k
import os from .folder import default_loader from .vision import VisionDataset from typing import Any, Callable, Optional, Union from collections import defaultdict class Flickr30k(VisionDataset): """`Flickr30k Entities <https://bryanplummer.com/Flickr30kEntities/>`_ Dataset. Args: root (str or ``path...
class Flickr30k(VisionDataset): '''`Flickr30k Entities <https://bryanplummer.com/Flickr30kEntities/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory where images are downloaded to. ann_file (string): Path to annotation file. transform (callable, optional): A function/tra...
4
2
14
2
9
3
2
0.64
1
5
0
0
3
3
3
13
56
10
28
20
18
18
22
13
18
3
3
2
6
18,151
pytorch/vision
pytorch_vision/torchvision/datasets/flickr.py
torchvision.datasets.flickr.Flickr8k
from pathlib import Path from typing import Any, Callable, Optional, Union from .folder import default_loader import os from .vision import VisionDataset class Flickr8k(VisionDataset): """`Flickr8k Entities <http://hockenmaier.cs.illinois.edu/8k-pictures.html>`_ Dataset. Args: root (str or ``pathlib.P...
class Flickr8k(VisionDataset): '''`Flickr8k Entities <http://hockenmaier.cs.illinois.edu/8k-pictures.html>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory where images are downloaded to. ann_file (string): Path to annotation file. transform (callable, optional): A functi...
4
2
13
2
8
3
2
0.69
1
7
1
0
3
3
3
13
54
10
26
18
16
18
20
11
16
3
3
1
5
18,152
pytorch/vision
pytorch_vision/torchvision/datasets/flickr.py
torchvision.datasets.flickr.Flickr8kParser
from html.parser import HTMLParser import os from typing import Any, Callable, Optional, Union import glob from pathlib import Path class Flickr8kParser(HTMLParser): """Parser for extracting captions from the Flickr8k dataset web page.""" def __init__(self, root: Union[str, Path]) -> None: super().__i...
class Flickr8kParser(HTMLParser): '''Parser for extracting captions from the Flickr8k dataset web page.''' def __init__(self, root: Union[str, Path]) -> None: pass def handle_starttag(self, tag: str, attrs: list[tuple[str, Optional[str]]]) -> None: pass def handle_endtag(self, tag: s...
5
1
9
1
7
1
3
0.1
1
3
0
0
4
5
4
42
41
9
29
11
24
3
27
11
22
5
2
2
10
18,153
pytorch/vision
pytorch_vision/torchvision/datasets/flowers102.py
torchvision.datasets.flowers102.Flowers102
from .vision import VisionDataset from typing import Any, Callable, Optional, Union from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg from pathlib import Path from .folder import default_loader class Flowers102(VisionDataset): """`Oxford 102 Flower <https://www.robots.o...
class Flowers102(VisionDataset): '''`Oxford 102 Flower <https://www.robots.ox.ac.uk/~vgg/data/flowers/102/>`_ Dataset. .. warning:: This class needs `scipy <https://docs.scipy.org/doc/>`_ to load target files from `.mat` format. Oxford 102 Flower is an image classification dataset consisting of 102...
7
1
11
2
10
0
3
0.29
1
9
0
0
6
5
6
16
105
22
65
34
50
19
50
27
42
4
3
2
16
18,154
pytorch/vision
pytorch_vision/torchvision/datasets/folder.py
torchvision.datasets.folder.DatasetFolder
from .vision import VisionDataset from typing import Any, Callable, cast, Optional, Union from pathlib import Path class DatasetFolder(VisionDataset): """A generic data loader. This default directory structure can be customized by overriding the :meth:`find_classes` method. Args: root (str or...
class DatasetFolder(VisionDataset): '''A generic data loader. This default directory structure can be customized by overriding the :meth:`find_classes` method. Args: root (str or ``pathlib.Path``): Root directory path. loader (callable): A function to load a sample given its path. ...
7
4
22
3
10
10
2
1.45
1
7
0
1
4
7
5
15
146
21
51
33
29
74
27
16
21
3
3
1
8
18,155
pytorch/vision
pytorch_vision/torchvision/datasets/folder.py
torchvision.datasets.folder.ImageFolder
from pathlib import Path from typing import Any, Callable, cast, Optional, Union class ImageFolder(DatasetFolder): """A generic data loader where the images are arranged in this way by default: :: root/dog/xxx.png root/dog/xxy.png root/dog/[...]/xxz.png root/cat/123.png ro...
class ImageFolder(DatasetFolder): '''A generic data loader where the images are arranged in this way by default: :: root/dog/xxx.png root/dog/xxy.png root/dog/[...]/xxz.png root/cat/123.png root/cat/nsdf3.png root/cat/[...]/asd932_.png This class inherits from :c...
2
1
19
0
19
0
2
1.25
1
5
0
3
1
1
1
16
51
6
20
11
10
25
4
3
2
2
4
0
2
18,156
pytorch/vision
pytorch_vision/torchvision/datasets/food101.py
torchvision.datasets.food101.Food101
import json from .utils import download_and_extract_archive, verify_str_arg from typing import Any, Callable, Optional, Union from .vision import VisionDataset from .folder import default_loader from pathlib import Path class Food101(VisionDataset): """`The Food-101 Data Set <https://data.vision.ee.ethz.ch/cvl/dat...
class Food101(VisionDataset): '''`The Food-101 Data Set <https://data.vision.ee.ethz.ch/cvl/datasets_extra/food-101/>`_. The Food-101 is a challenging data set of 101 food categories with 101,000 images. For each class, 250 manually reviewed test images are provided as well as 750 training images. On p...
7
1
9
1
8
0
2
0.33
1
10
0
0
6
9
6
16
83
18
49
30
35
16
40
21
33
4
3
1
12
18,157
pytorch/vision
pytorch_vision/torchvision/datasets/gtsrb.py
torchvision.datasets.gtsrb.GTSRB
import PIL from typing import Any, Callable, Optional, Union import csv from .vision import VisionDataset from .utils import download_and_extract_archive, verify_str_arg from .folder import make_dataset import pathlib class GTSRB(VisionDataset): """`German Traffic Sign Recognition Benchmark (GTSRB) <https://benchm...
class GTSRB(VisionDataset): '''`German Traffic Sign Recognition Benchmark (GTSRB) <https://benchmark.ini.rub.de/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of the dataset. split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``. t...
6
1
15
2
12
0
3
0.17
1
8
0
0
5
6
5
15
92
18
63
24
50
11
37
16
31
5
3
2
13
18,158
pytorch/vision
pytorch_vision/torchvision/datasets/hmdb51.py
torchvision.datasets.hmdb51.HMDB51
from pathlib import Path import glob from typing import Any, Callable, Optional, Union import os from .vision import VisionDataset from .folder import find_classes, make_dataset from torch import Tensor from .video_utils import VideoClips class HMDB51(VisionDataset): """ `HMDB51 <https://serre-lab.clps.brown.e...
class HMDB51(VisionDataset): ''' `HMDB51 <https://serre-lab.clps.brown.edu/resource/hmdb-a-large-human-motion-database/>`_ dataset. HMDB51 is an action recognition video dataset. This dataset consider every video as a collection of video clips of fixed size, specified by ``frames_per_clip``, wh...
7
1
17
1
16
1
3
0.4
1
11
1
0
5
8
5
15
140
18
87
55
63
35
50
36
44
7
3
3
13
18,159
pytorch/vision
pytorch_vision/torchvision/datasets/imagenet.py
torchvision.datasets.imagenet.ImageNet
import os from .utils import check_integrity, extract_archive, verify_str_arg from typing import Any, Optional, Union from .folder import ImageFolder from pathlib import Path class ImageNet(ImageFolder): """`ImageNet <http://image-net.org/>`_ 2012 Classification Dataset. .. note:: Before using this cl...
class ImageNet(ImageFolder): '''`ImageNet <http://image-net.org/>`_ 2012 Classification Dataset. .. note:: Before using this class, it is required to download ImageNet 2012 dataset from `here <https://image-net.org/challenges/LSVRC/2012/2012-downloads.php>`_ and place the files ``ILSVRC...
6
1
7
1
6
0
2
0.88
1
5
0
0
4
6
4
20
58
11
25
13
19
22
23
11
18
5
5
2
8
18,160
pytorch/vision
pytorch_vision/torchvision/datasets/imagenette.py
torchvision.datasets.imagenette.Imagenette
from pathlib import Path from typing import Any, Callable, Optional, Union from .vision import VisionDataset from .folder import default_loader, find_classes, make_dataset from .utils import download_and_extract_archive, verify_str_arg class Imagenette(VisionDataset): """`Imagenette <https://github.com/fastai/imag...
class Imagenette(VisionDataset): '''`Imagenette <https://github.com/fastai/imagenette#imagenette-1>`_ image classification dataset. Args: root (str or ``pathlib.Path``): Root directory of the Imagenette dataset. split (string, optional): The dataset split. Supports ``"train"`` (default), and ``...
6
1
10
2
8
0
2
0.27
1
7
0
0
5
12
5
15
91
16
59
28
45
16
33
19
27
3
3
1
10
18,161
pytorch/vision
pytorch_vision/torchvision/datasets/inaturalist.py
torchvision.datasets.inaturalist.INaturalist
import os from pathlib import Path from .vision import VisionDataset import os.path from .utils import download_and_extract_archive, verify_str_arg from typing import Any, Callable, Optional, Union from PIL import Image class INaturalist(VisionDataset): """`iNaturalist <https://github.com/visipedia/inat_comp>`_ Da...
class INaturalist(VisionDataset): '''`iNaturalist <https://github.com/visipedia/inat_comp>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where the image files are stored. This class does not require/use annotation files. version (string, optional): Which...
9
5
21
3
15
3
5
0.42
1
12
0
0
8
6
8
18
207
38
119
46
102
50
103
38
94
9
3
4
38
18,162
pytorch/vision
pytorch_vision/torchvision/datasets/kinetics.py
torchvision.datasets.kinetics.Kinetics
import urllib from torch import Tensor import os from functools import partial from multiprocessing import Pool from .vision import VisionDataset from .folder import find_classes, make_dataset from os import path from .video_utils import VideoClips from pathlib import Path from .utils import check_integrity, download_a...
class Kinetics(VisionDataset): '''`Generic Kinetics <https://www.deepmind.com/open-source/kinetics>`_ dataset. Kinetics-400/600/700 are action recognition video datasets. This dataset consider every video as a collection of video clips of fixed size, specified by ``frames_per_clip``, where the step...
9
4
20
2
16
2
3
0.52
1
11
1
1
7
11
7
17
216
30
122
63
92
64
70
39
62
5
3
3
18
18,163
pytorch/vision
pytorch_vision/torchvision/datasets/kitti.py
torchvision.datasets.kitti.Kitti
from pathlib import Path from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive from .vision import VisionDataset import csv from PIL import Image import os class Kitti(VisionDataset): """`KITTI <http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark>`_ Datase...
class Kitti(VisionDataset): '''`KITTI <http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark>`_ Dataset. It corresponds to the "left color images of object" dataset, for object detection. Args: root (str or ``pathlib.Path``): Root directory where images are downloaded to. E...
9
4
14
1
10
3
3
0.54
1
8
0
0
7
4
7
17
147
21
82
36
65
44
50
26
42
7
3
2
19
18,164
pytorch/vision
pytorch_vision/torchvision/datasets/lfw.py
torchvision.datasets.lfw.LFWPairs
import os from .folder import default_loader from typing import Any, Callable, Optional, Union class LFWPairs(_LFW): """`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset. .. warning: The LFW dataset is no longer available for automatic download. Please download it manually and place it in the...
class LFWPairs(_LFW): '''`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset. .. warning: The LFW dataset is no longer available for automatic download. Please download it manually and place it in the specified directory. Args: root (str or ``pathlib.Path``): Root directory of dataset...
4
2
19
2
15
2
3
0.48
1
6
0
0
3
3
3
20
80
12
46
25
34
22
37
16
33
5
4
3
9
18,165
pytorch/vision
pytorch_vision/torchvision/datasets/lfw.py
torchvision.datasets.lfw.LFWPeople
from .folder import default_loader from typing import Any, Callable, Optional, Union import os class LFWPeople(_LFW): """`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset. .. warning: The LFW dataset is no longer available for automatic download. Please download it manually and place it in th...
class LFWPeople(_LFW): '''`LFW <http://vis-www.cs.umass.edu/lfw/>`_ Dataset. .. warning: The LFW dataset is no longer available for automatic download. Please download it manually and place it in the specified directory. Args: root (str or ``pathlib.Path``): Root directory of datase...
6
2
11
1
9
1
2
0.5
1
7
0
0
5
3
5
22
80
14
44
32
30
22
36
22
30
5
4
4
11
18,166
pytorch/vision
pytorch_vision/torchvision/datasets/lfw.py
torchvision.datasets.lfw._LFW
from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg from typing import Any, Callable, Optional, Union from .folder import default_loader import os from .vision import VisionDataset from pathlib import Path class _LFW(VisionDataset): base_folder = 'lfw-py' download_url...
class _LFW(VisionDataset): def __init__(self, root: Union[str, Path], split: str, image_set: str, view: str, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None, download: bool=False, loader: Callable[[str], Any]=default_loader) -> None: pass def _check_integrity(self) -> bo...
7
0
8
1
7
0
2
0
1
7
0
2
7
9
7
17
81
14
67
36
50
0
46
25
38
3
3
1
13
18,167
pytorch/vision
pytorch_vision/torchvision/datasets/lsun.py
torchvision.datasets.lsun.LSUN
from .utils import iterable_to_str, verify_str_arg from .vision import VisionDataset from pathlib import Path import os.path from collections.abc import Iterable from typing import Any, Callable, cast, Optional, Union class LSUN(VisionDataset): """`LSUN <https://paperswithcode.com/dataset/lsun>`_ dataset. You...
class LSUN(VisionDataset): '''`LSUN <https://paperswithcode.com/dataset/lsun>`_ dataset. You will need to install the ``lmdb`` package to use this dataset: run ``pip install lmdb`` Args: root (str or ``pathlib.Path``): Root directory for the database files. classes (string or list): One...
6
2
18
2
15
1
3
0.26
1
10
1
0
5
4
5
15
112
19
74
31
62
19
56
25
50
5
3
2
14
18,168
pytorch/vision
pytorch_vision/torchvision/datasets/lsun.py
torchvision.datasets.lsun.LSUNClass
from .vision import VisionDataset import string import pickle from PIL import Image import io from typing import Any, Callable, cast, Optional, Union import os.path class LSUNClass(VisionDataset): def __init__(self, root: str, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None) -> None:...
class LSUNClass(VisionDataset): def __init__(self, root: str, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None) -> None: pass def __getitem__(self, index: int) -> tuple[Any, Any]: pass def __len__(self) -> int: pass
4
0
12
2
10
0
2
0
1
4
0
0
3
3
3
13
40
8
32
17
25
0
29
13
24
3
3
2
6
18,169
pytorch/vision
pytorch_vision/torchvision/datasets/mnist.py
torchvision.datasets.mnist.EMNIST
import shutil import os.path from .utils import _flip_byte_order, check_integrity, download_and_extract_archive, extract_archive, verify_str_arg from typing import Any, Callable, Optional, Union import os from pathlib import Path import string class EMNIST(MNIST): """`EMNIST <https://www.westernsydney.edu.au/bens/...
class EMNIST(MNIST): '''`EMNIST <https://www.westernsydney.edu.au/bens/home/reproducible_research/emnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``EMNIST/raw/train-images-idx3-ubyte`` and ``EMNIST/raw/t10k-images-idx3-ubyte`` exist. split (...
15
2
4
0
3
0
1
0.39
1
5
0
0
7
5
9
35
82
14
49
28
34
19
37
22
27
4
4
2
13
18,170
pytorch/vision
pytorch_vision/torchvision/datasets/mnist.py
torchvision.datasets.mnist.FashionMNIST
class FashionMNIST(MNIST): """`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``FashionMNIST/raw/train-images-idx3-ubyte`` and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist. train...
class FashionMNIST(MNIST): '''`Fashion-MNIST <https://github.com/zalandoresearch/fashion-mnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``FashionMNIST/raw/train-images-idx3-ubyte`` and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist. train ...
1
1
0
0
0
0
0
1.56
1
0
0
0
0
0
0
26
26
3
9
4
8
14
4
4
3
0
4
0
0
18,171
pytorch/vision
pytorch_vision/torchvision/datasets/mnist.py
torchvision.datasets.mnist.KMNIST
class KMNIST(MNIST): """`Kuzushiji-MNIST <https://github.com/rois-codh/kmnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``KMNIST/raw/train-images-idx3-ubyte`` and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist. train (bool, optional): If True, c...
class KMNIST(MNIST): '''`Kuzushiji-MNIST <https://github.com/rois-codh/kmnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``KMNIST/raw/train-images-idx3-ubyte`` and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist. train (bool, optional): If True, cr...
1
1
0
0
0
0
0
1.56
1
0
0
0
0
0
0
26
26
3
9
4
8
14
4
4
3
0
4
0
0
18,172
pytorch/vision
pytorch_vision/torchvision/datasets/mnist.py
torchvision.datasets.mnist.MNIST
from pathlib import Path import os.path from urllib.error import URLError from typing import Any, Callable, Optional, Union from .vision import VisionDataset import os from ..utils import _Image_fromarray import warnings from .utils import _flip_byte_order, check_integrity, download_and_extract_archive, extract_archive...
class MNIST(VisionDataset): '''`MNIST <http://yann.lecun.com/exdb/mnist/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``MNIST/raw/train-images-idx3-ubyte`` and ``MNIST/raw/t10k-images-idx3-ubyte`` exist. train (bool, optional): If True, creates ...
24
3
7
1
6
1
2
0.22
1
10
0
4
16
3
16
26
182
35
121
54
90
27
83
38
66
6
3
3
31
18,173
pytorch/vision
pytorch_vision/torchvision/datasets/mnist.py
torchvision.datasets.mnist.QMNIST
import os.path from typing import Any, Callable, Optional, Union from pathlib import Path from .utils import _flip_byte_order, check_integrity, download_and_extract_archive, extract_archive, verify_str_arg import torch from ..utils import _Image_fromarray import os class QMNIST(MNIST): """`QMNIST <https://github.c...
class QMNIST(MNIST): '''`QMNIST <https://github.com/facebookresearch/qmnist>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset whose ``raw`` subdir contains binary files of the datasets. what (string,optional): Can be 'train', 'test', 'test10k', ...
11
2
8
1
7
1
3
0.31
1
9
0
0
8
6
8
34
148
15
102
29
89
32
55
24
46
6
4
1
20
18,174
pytorch/vision
pytorch_vision/torchvision/datasets/moving_mnist.py
torchvision.datasets.moving_mnist.MovingMNIST
from typing import Callable, Optional, Union import numpy as np from torchvision.datasets.utils import download_url, verify_str_arg from pathlib import Path import torch from torchvision.datasets.vision import VisionDataset import os.path class MovingMNIST(VisionDataset): """`MovingMNIST <http://www.cs.toronto.edu...
class MovingMNIST(VisionDataset): '''`MovingMNIST <http://www.cs.toronto.edu/~nitish/unsupervised_video/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where ``MovingMNIST/mnist_test_seq.npy`` exists. split (string, optional): The dataset split, supports ``None`` (d...
6
2
12
2
9
1
3
0.41
1
10
0
0
5
5
5
15
84
15
49
21
36
20
35
14
29
8
3
1
14
18,175
pytorch/vision
pytorch_vision/torchvision/datasets/omniglot.py
torchvision.datasets.omniglot.Omniglot
from pathlib import Path from typing import Any, Callable, Optional, Union from os.path import join from .vision import VisionDataset from .utils import check_integrity, download_and_extract_archive, list_dir, list_files from PIL import Image class Omniglot(VisionDataset): """`Omniglot <https://github.com/brendenl...
class Omniglot(VisionDataset): '''`Omniglot <https://github.com/brendenlake/omniglot>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``omniglot-py`` exists. background (bool, optional): If True, creates dataset from the "background" set, o...
7
2
11
1
8
1
2
0.36
1
8
0
0
6
7
6
16
92
16
56
31
42
20
41
23
34
3
3
1
13
18,176
pytorch/vision
pytorch_vision/torchvision/datasets/oxford_iiit_pet.py
torchvision.datasets.oxford_iiit_pet.OxfordIIITPet
import os import os.path from .utils import download_and_extract_archive, verify_str_arg import pathlib from typing import Any, Callable, Optional, Union from collections.abc import Sequence from .vision import VisionDataset from PIL import Image class OxfordIIITPet(VisionDataset): """`Oxford-IIIT Pet Dataset <h...
class OxfordIIITPet(VisionDataset): '''`Oxford-IIIT Pet Dataset <https://www.robots.ox.ac.uk/~vgg/data/pets/>`_. Args: root (str or ``pathlib.Path``): Root directory of the dataset. split (string, optional): The dataset split, supports ``"trainval"`` (default) or ``"test"``. target_ty...
6
1
18
2
16
0
4
0.2
1
11
0
0
5
14
5
15
121
21
84
40
69
17
60
30
54
7
3
2
19
18,177
pytorch/vision
pytorch_vision/torchvision/datasets/pcam.py
torchvision.datasets.pcam.PCAM
from typing import Any, Callable, Optional, Union import pathlib from .vision import VisionDataset from PIL import Image from .utils import _decompress, download_file_from_google_drive, verify_str_arg class PCAM(VisionDataset): """`PCAM Dataset <https://github.com/basveeling/pcam>`_. The PatchCamelyon datas...
class PCAM(VisionDataset): '''`PCAM Dataset <https://github.com/basveeling/pcam>`_. The PatchCamelyon dataset is a binary classification dataset with 327,680 color images (96px x 96px), extracted from histopathologic scans of lymph node sections. Each image is annotated with a binary label indicating...
6
1
12
2
10
0
2
0.24
1
8
0
0
5
3
5
15
125
20
88
30
74
21
42
20
35
4
3
1
12
18,178
pytorch/vision
pytorch_vision/torchvision/datasets/phototour.py
torchvision.datasets.phototour.PhotoTour
from pathlib import Path import torch from .vision import VisionDataset import os from .utils import download_url from typing import Any, Callable, Optional, Union class PhotoTour(VisionDataset): """`Multi-view Stereo Correspondence <http://matthewalunbrown.com/patchdata/patchdata.html>`_ Dataset. .. note:: ...
class PhotoTour(VisionDataset): '''`Multi-view Stereo Correspondence <http://matthewalunbrown.com/patchdata/patchdata.html>`_ Dataset. .. note:: We only provide the newer version of the dataset, since the authors state that it is more suitable for training descriptors based on difference of...
9
2
11
2
8
1
2
0.22
1
8
0
0
8
10
8
18
168
28
115
43
98
25
60
34
50
4
3
2
17
18,179
pytorch/vision
pytorch_vision/torchvision/datasets/places365.py
torchvision.datasets.places365.Places365
import os from .folder import default_loader from urllib.parse import urljoin from .vision import VisionDataset from .utils import check_integrity, download_and_extract_archive, verify_str_arg from pathlib import Path from typing import Any, Callable, cast, Optional, Union from os import path class Places365(VisionDat...
class Places365(VisionDataset): '''`Places365 <http://places2.csail.mit.edu/index.html>`_ classification dataset. Args: root (str or ``pathlib.Path``): Root directory of the Places365 dataset. split (string, optional): The dataset split. Can be one of ``train-standard`` (default), ``train-chall...
17
1
7
1
6
0
2
0.26
1
10
0
0
12
8
12
22
157
28
102
53
76
27
74
39
59
3
3
1
24
18,180
pytorch/vision
pytorch_vision/torchvision/datasets/rendered_sst2.py
torchvision.datasets.rendered_sst2.RenderedSST2
from pathlib import Path from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive, verify_str_arg from .vision import VisionDataset from .folder import default_loader, make_dataset class RenderedSST2(VisionDataset): """`The Rendered SST2 Dataset <https://github.com/openai/C...
class RenderedSST2(VisionDataset): '''`The Rendered SST2 Dataset <https://github.com/openai/CLIP/blob/main/data/rendered-sst2.md>`_. Rendered SST2 is an image classification dataset used to evaluate the models capability on optical character recognition. This dataset was generated by rendering sentences in...
7
1
8
1
7
0
2
0.4
1
8
0
0
6
7
6
16
76
16
43
26
29
17
36
18
29
3
3
2
13
18,181
pytorch/vision
pytorch_vision/torchvision/datasets/samplers/clip_sampler.py
torchvision.datasets.samplers.clip_sampler.DistributedSampler
import torch from collections.abc import Iterator, Sized import torch.distributed as dist import math from typing import cast, Optional, Union from torch.utils.data import Sampler class DistributedSampler(Sampler): """ Extension of DistributedSampler, as discussed in https://github.com/pytorch/pytorch/issu...
class DistributedSampler(Sampler): ''' Extension of DistributedSampler, as discussed in https://github.com/pytorch/pytorch/issues/23430 Example: dataset: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] num_replicas: 4 shuffle: False when group_size = 1 RANK | ...
5
1
15
1
13
1
3
0.46
1
7
0
0
4
9
4
4
93
14
54
25
42
25
44
18
39
6
1
2
11
18,182
pytorch/vision
pytorch_vision/torchvision/datasets/samplers/clip_sampler.py
torchvision.datasets.samplers.clip_sampler.RandomClipSampler
import torch.distributed as dist from torch.utils.data import Sampler from collections.abc import Iterator, Sized from torchvision.datasets.video_utils import VideoClips import torch class RandomClipSampler(Sampler): """ Samples at most `max_video_clips_per_video` clips for each video randomly Args: ...
class RandomClipSampler(Sampler): ''' Samples at most `max_video_clips_per_video` clips for each video randomly Args: video_clips (VideoClips): video clips to sample from max_clips_per_video (int): maximum number of clips to be sampled per video ''' def __init__(self, video_clips: ...
4
1
7
0
6
1
2
0.4
1
4
1
0
3
2
3
3
32
4
20
14
16
8
20
14
16
2
1
1
5
18,183
pytorch/vision
pytorch_vision/torchvision/datasets/samplers/clip_sampler.py
torchvision.datasets.samplers.clip_sampler.UniformClipSampler
import torch.distributed as dist from typing import cast, Optional, Union from torch.utils.data import Sampler import torch from collections.abc import Iterator, Sized from torchvision.datasets.video_utils import VideoClips class UniformClipSampler(Sampler): """ Sample `num_video_clips_per_video` clips for eac...
class UniformClipSampler(Sampler): ''' Sample `num_video_clips_per_video` clips for each video, equally spaced. When number of unique clips in the video is fewer than num_video_clips_per_video, repeat the clips until `num_video_clips_per_video` clips are collected Args: video_clips (VideoCl...
4
1
7
0
6
1
2
0.53
1
4
1
0
3
2
3
3
34
5
19
12
15
10
19
11
15
3
1
2
6
18,184
pytorch/vision
pytorch_vision/torchvision/datasets/sbd.py
torchvision.datasets.sbd.SBDataset
import os from pathlib import Path from .vision import VisionDataset from .utils import download_and_extract_archive, download_url, verify_str_arg from PIL import Image from typing import Any, Callable, Optional, Union import shutil import numpy as np class SBDataset(VisionDataset): """`Semantic Boundaries Dataset...
class SBDataset(VisionDataset): '''`Semantic Boundaries Dataset <http://home.bharathh.info/pubs/codes/SBD/download.html>`_ The SBD currently contains annotations from 11355 images taken from the PASCAL VOC 2011 dataset. .. note :: Please note that the train and val splits included with this dataset...
7
1
12
2
9
0
2
0.4
1
9
0
0
6
8
6
16
114
26
63
43
48
25
53
34
45
7
3
2
13
18,185
pytorch/vision
pytorch_vision/torchvision/datasets/sbu.py
torchvision.datasets.sbu.SBU
from pathlib import Path import os from .vision import VisionDataset from typing import Any, Callable, Optional, Union from .folder import default_loader from .utils import check_integrity, download_and_extract_archive, download_url class SBU(VisionDataset): """`SBU Captioned Photo <http://www.cs.virginia.edu/~vic...
class SBU(VisionDataset): '''`SBU Captioned Photo <http://www.cs.virginia.edu/~vicente/sbucaptions/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where tarball ``SBUCaptionedPhotoDataset.tar.gz`` exists. transform (callable, optional): A function/transf...
6
5
15
2
10
3
3
0.45
1
9
0
0
5
2
5
15
99
18
56
32
44
25
50
25
44
5
3
3
15
18,186
pytorch/vision
pytorch_vision/torchvision/datasets/semeion.py
torchvision.datasets.semeion.SEMEION
import os.path from pathlib import Path from .vision import VisionDataset from ..utils import _Image_fromarray import numpy as np from .utils import check_integrity, download_url from typing import Any, Callable, Optional, Union class SEMEION(VisionDataset): """`SEMEION <http://archive.ics.uci.edu/ml/datasets/seme...
class SEMEION(VisionDataset): '''`SEMEION <http://archive.ics.uci.edu/ml/datasets/semeion+handwritten+digit>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``semeion.py`` exists. transform (callable, optional): A function/transform that ta...
6
2
11
2
8
2
2
0.52
1
7
0
0
5
2
5
15
80
16
42
23
30
22
36
17
30
3
3
1
11
18,187
pytorch/vision
pytorch_vision/torchvision/datasets/stanford_cars.py
torchvision.datasets.stanford_cars.StanfordCars
from .vision import VisionDataset from typing import Any, Callable, Optional, Union import pathlib from .folder import default_loader from .utils import verify_str_arg class StanfordCars(VisionDataset): """Stanford Cars Dataset The Cars dataset contains 16,185 images of 196 classes of cars. The data is s...
class StanfordCars(VisionDataset): '''Stanford Cars Dataset The Cars dataset contains 16,185 images of 196 classes of cars. The data is split into 8,144 training images and 8,041 testing images, where each class has been split roughly in a 50-50 split The original URL is https://ai.stanford.edu/~j...
6
2
14
2
12
1
2
0.47
1
10
0
0
5
7
5
15
105
20
60
24
46
28
38
17
31
5
3
1
12
18,188
pytorch/vision
pytorch_vision/torchvision/datasets/stl10.py
torchvision.datasets.stl10.STL10
from pathlib import Path import numpy as np from typing import Any, Callable, cast, Optional, Union from .vision import VisionDataset import os.path from .utils import check_integrity, download_and_extract_archive, verify_str_arg from PIL import Image class STL10(VisionDataset): """`STL10 <https://cs.stanford.edu/...
class STL10(VisionDataset): '''`STL10 <https://cs.stanford.edu/~acoates/stl10/>`_ Dataset. Args: root (str or ``pathlib.Path``): Root directory of dataset where directory ``stl10_binary`` exists. split (string): One of {'train', 'test', 'unlabeled', 'train+unlabeled'}. A...
10
2
13
1
11
1
3
0.27
1
10
0
0
9
6
9
19
163
24
111
49
93
30
92
37
82
7
3
2
27
18,189
pytorch/vision
pytorch_vision/torchvision/datasets/sun397.py
torchvision.datasets.sun397.SUN397
from .vision import VisionDataset from .utils import download_and_extract_archive from typing import Any, Callable, Optional, Union from .folder import default_loader from pathlib import Path class SUN397(VisionDataset): """`The SUN397 Data Set <https://vision.princeton.edu/projects/2010/SUN/>`_. The SUN397 o...
class SUN397(VisionDataset): '''`The SUN397 Data Set <https://vision.princeton.edu/projects/2010/SUN/>`_. The SUN397 or Scene UNderstanding (SUN) is a dataset for scene recognition consisting of 397 categories with 108'754 images. Args: root (str or ``pathlib.Path``): Root directory of the data...
6
1
9
2
7
0
2
0.31
1
11
0
0
5
6
5
15
67
16
39
23
27
12
31
15
25
3
3
1
10
18,190
pytorch/vision
pytorch_vision/torchvision/datasets/svhn.py
torchvision.datasets.svhn.SVHN
from .utils import check_integrity, download_url, verify_str_arg from PIL import Image import os.path import numpy as np from .vision import VisionDataset from typing import Any, Callable, Optional, Union from pathlib import Path class SVHN(VisionDataset): """`SVHN <http://ufldl.stanford.edu/housenumbers/>`_ Datas...
class SVHN(VisionDataset): '''`SVHN <http://ufldl.stanford.edu/housenumbers/>`_ Dataset. Note: The SVHN dataset assigns the label `10` to the digit `0`. However, in this Dataset, we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which expect the class labels to be in...
7
2
12
2
7
3
2
0.59
1
8
0
0
6
6
6
16
119
22
61
28
46
36
38
21
30
3
3
1
10
18,191
pytorch/vision
pytorch_vision/torchvision/datasets/ucf101.py
torchvision.datasets.ucf101.UCF101
from torch import Tensor from pathlib import Path import os from .video_utils import VideoClips from .vision import VisionDataset from typing import Any, Callable, Optional, Union from .folder import find_classes, make_dataset class UCF101(VisionDataset): """ `UCF101 <https://www.crcv.ucf.edu/data/UCF101.php>`...
class UCF101(VisionDataset): ''' `UCF101 <https://www.crcv.ucf.edu/data/UCF101.php>`_ dataset. UCF101 is an action recognition video dataset. This dataset consider every video as a collection of video clips of fixed size, specified by ``frames_per_clip``, where the step in frames between each clip ...
7
1
15
1
13
1
2
0.54
1
11
1
0
5
9
5
15
120
15
68
43
44
37
38
24
32
2
3
1
8
18,192
pytorch/vision
pytorch_vision/torchvision/datasets/usps.py
torchvision.datasets.usps.USPS
import numpy as np import os from pathlib import Path from .utils import download_url from typing import Any, Callable, Optional, Union from .vision import VisionDataset from ..utils import _Image_fromarray class USPS(VisionDataset): """`USPS <https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html...
class USPS(VisionDataset): '''`USPS <https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass.html#usps>`_ Dataset. The data-format is : [label [index:value ]*256 \n] * num_lines, where ``label`` lies in ``[1, 10]``. The value for each pixel lies in ``[-1, 1]``. Here we transform the ``label`` in...
4
2
17
3
11
3
2
0.52
1
6
0
0
3
3
3
13
85
15
46
25
34
24
28
16
23
3
3
1
7
18,193
pytorch/vision
pytorch_vision/torchvision/datasets/video_utils.py
torchvision.datasets.video_utils.VideoClips
import bisect from torchvision.io import _probe_video_from_file, _read_video_from_file, read_video, read_video_timestamps import torch from typing import Any, Callable, cast, Optional, TypeVar, Union from fractions import Fraction from .utils import tqdm import warnings import math class VideoClips: """ Given ...
class VideoClips: ''' Given a list of video files, computes all consecutive subvideos of size `clip_length_in_frames`, where the distance between each subvideo in the same video is defined by `frames_between_clips`. If `frame_rate` is specified, it will also resample all the videos to have the ...
19
5
20
2
15
4
3
0.34
0
15
1
0
13
18
15
15
347
41
232
96
194
79
166
72
148
14
0
2
40
18,194
pytorch/vision
pytorch_vision/torchvision/datasets/video_utils.py
torchvision.datasets.video_utils._VideoTimestampsDataset
from typing import Any, Callable, cast, Optional, TypeVar, Union from torchvision.io import _probe_video_from_file, _read_video_from_file, read_video, read_video_timestamps class _VideoTimestampsDataset: """ Dataset used to parallelize the reading of the timestamps of a list of videos, given their paths in...
class _VideoTimestampsDataset: ''' Dataset used to parallelize the reading of the timestamps of a list of videos, given their paths in the filesystem. Used in VideoClips and defined at top level, so it can be pickled when forking. ''' def __init__(self, video_paths: list[str]) -> None: ...
4
1
2
0
2
0
1
0.86
0
3
0
0
3
1
3
3
17
4
7
5
3
6
7
5
3
1
0
0
3
18,195
pytorch/vision
pytorch_vision/torchvision/datasets/vision.py
torchvision.datasets.vision.StandardTransform
from typing import Any, Callable, Optional, Union class StandardTransform: def __init__(self, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None) -> None: self.transform = transform self.target_transform = target_transform def __call__(self, input: Any, target: Any)...
class StandardTransform: def __init__(self, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None) -> None: pass def __call__(self, input: Any, target: Any) -> tuple[Any, Any]: pass def _format_transform_repr(self, transform: Callable, head: str) -> list[str]: ...
5
0
5
0
5
0
2
0
0
2
0
0
4
2
4
4
24
4
20
9
15
0
20
9
15
3
0
1
8
18,196
pytorch/vision
pytorch_vision/torchvision/datasets/vision.py
torchvision.datasets.vision.VisionDataset
from ..utils import _log_api_usage_once from pathlib import Path import os from typing import Any, Callable, Optional, Union import torch.utils.data as data class VisionDataset(data.Dataset): """ Base Class For making datasets which are compatible with torchvision. It is necessary to override the ``__getit...
class VisionDataset(data.Dataset): ''' Base Class For making datasets which are compatible with torchvision. It is necessary to override the ``__getitem__`` and ``__len__`` method. Args: root (string, optional): Root directory of dataset. Only used for `__repr__`. transforms (callable, ...
7
2
8
1
7
1
2
0.54
1
7
1
48
6
4
6
10
76
14
41
24
28
22
35
18
28
4
2
1
11
18,197
pytorch/vision
pytorch_vision/torchvision/datasets/voc.py
torchvision.datasets.voc.VOCDetection
import collections from xml.etree.ElementTree import Element as ET_Element from typing import Any, Callable, Optional, Union from PIL import Image class VOCDetection(_VOCBase): """`Pascal VOC <http://host.robots.ox.ac.uk/pascal/VOC/>`_ Detection Dataset. Args: root (str or ``pathlib.Path``): Root dire...
class VOCDetection(_VOCBase): '''`Pascal VOC <http://host.robots.ox.ac.uk/pascal/VOC/>`_ Detection Dataset. Args: root (str or ``pathlib.Path``): Root directory of the VOC Dataset. year (string, optional): The dataset year, supports years ``"2007"`` to ``"2012"``. image_set (string, opt...
6
2
11
1
8
2
4
0.77
1
5
0
0
2
0
3
15
61
8
30
17
24
23
28
15
24
8
4
3
11
18,198
pytorch/vision
pytorch_vision/torchvision/datasets/voc.py
torchvision.datasets.voc.VOCSegmentation
from PIL import Image from typing import Any, Callable, Optional, Union class VOCSegmentation(_VOCBase): """`Pascal VOC <http://host.robots.ox.ac.uk/pascal/VOC/>`_ Segmentation Dataset. Args: root (str or ``pathlib.Path``): Root directory of the VOC Dataset. year (string, optional): The datase...
class VOCSegmentation(_VOCBase): '''`Pascal VOC <http://host.robots.ox.ac.uk/pascal/VOC/>`_ Segmentation Dataset. Args: root (str or ``pathlib.Path``): Root directory of the VOC Dataset. year (string, optional): The dataset year, supports years ``"2007"`` to ``"2012"``. image_set (strin...
4
2
9
2
4
3
2
1.69
1
3
0
0
2
0
2
14
42
7
13
9
9
22
12
8
9
2
4
1
3
18,199
pytorch/vision
pytorch_vision/torchvision/datasets/voc.py
torchvision.datasets.voc._VOCBase
import os from pathlib import Path from typing import Any, Callable, Optional, Union from .utils import download_and_extract_archive, verify_str_arg from .vision import VisionDataset class _VOCBase(VisionDataset): _SPLITS_DIR: str _TARGET_DIR: str _TARGET_FILE_EXT: str def __init__(self, root: Union[s...
class _VOCBase(VisionDataset): def __init__(self, root: Union[str, Path], year: str='2012', image_set: str='train', download: bool=False, transform: Optional[Callable]=None, target_transform: Optional[Callable]=None, transforms: Optional[Callable]=None): pass def __len__(self) -> int: pass
3
0
25
6
19
0
3
0
1
7
0
2
2
8
2
12
55
13
42
31
30
0
33
20
30
5
3
1
6