Spaces:
Building
Building
File size: 1,829 Bytes
4187c6f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
from dataclasses import dataclass
from typing import Optional, Any, Dict
from pathlib import Path
@dataclass
class AugmentationConfiguration:
gaussian_noise: dict
brightness_contrast: dict
enabled: bool = False
brightness: float = 0.5
contrast: float = 0.5
saturation: float = 0.5
hue: float = 0.5
random_resized_crop: Any = False
random_flip: float = 0.5
@dataclass(kw_only=True)
class DataConfiguration:
augmentations: AugmentationConfiguration
loading: Dict[str, Dict[str, Any]]
target_focal_length: Optional[int] = None
reduce_fov: Optional[bool] = None
resize_image: Optional[Any] = None
pad_to_square: Optional[bool] = None
pad_to_multiple: Optional[int] = None
gravity_align: Optional[bool] = None
rectify_pitch: Optional[bool] = True
num_classes: int
name: str
seed: Optional[int] = 0
random: Optional[bool] = True
num_threads: Optional[int] = None
@dataclass(kw_only=True)
class MIADataConfiguration(DataConfiguration):
scenes: list[str]
split: Any
data_dir: Path
pixel_per_meter: int
crop_size_meters: int
name: str = "mapillary"
filter_for: Optional[str] = None
filter_by_ground_angle: Optional[float] = None
min_num_points: int = 0
@dataclass(kw_only=True)
class KITTIDataConfiguration(DataConfiguration):
seam_root_dir: Path
dataset_root_dir: Path
bev_percentage: float
pixel_per_meter: int
crop_size_meters: int
class_mapping: Optional[Any] = None
percentage: float = 1.0
@dataclass(kw_only=True)
class NuScenesDataConfiguration(DataConfiguration):
data_dir: Path
map_dir: Path
pixel_per_meter: int
crop_size_meters: int
percentage: float = 1.0
class_mapping: Optional[Any] = None
version: str = "v1.0-trainval"
|