Spaces:
Running
Running
| from dataclasses import dataclass | |
| from typing import Any, Dict, List, Optional, Union | |
| from torch import nn | |
| class AnchorConfig: | |
| strides: List[int] | |
| reg_max: Optional[int] | |
| anchor_num: Optional[int] | |
| anchor: List[List[int]] | |
| class LayerConfg: | |
| args: Dict | |
| source: Union[int, str, List[int]] | |
| tags: str | |
| class BlockConfig: | |
| block: List[Dict[str, LayerConfg]] | |
| class ModelConfig: | |
| name: Optional[str] | |
| anchor: AnchorConfig | |
| model: Dict[str, BlockConfig] | |
| class DownloadDetail: | |
| url: str | |
| file_size: int | |
| class DownloadOptions: | |
| details: Dict[str, DownloadDetail] | |
| class DatasetConfig: | |
| path: str | |
| class_num: int | |
| class_list: List[str] | |
| auto_download: Optional[DownloadOptions] | |
| class DataConfig: | |
| shuffle: bool | |
| batch_size: int | |
| pin_memory: bool | |
| cpu_num: int | |
| image_size: List[int] | |
| data_augment: Dict[str, int] | |
| source: Optional[Union[str, int]] | |
| dynamic_shape: Optional[bool] | |
| class OptimizerArgs: | |
| lr: float | |
| weight_decay: float | |
| momentum: float | |
| class OptimizerConfig: | |
| type: str | |
| args: OptimizerArgs | |
| class MatcherConfig: | |
| iou: str | |
| topk: int | |
| factor: Dict[str, int] | |
| class LossConfig: | |
| objective: Dict[str, int] | |
| aux: Union[bool, float] | |
| matcher: MatcherConfig | |
| class SchedulerConfig: | |
| type: str | |
| warmup: Dict[str, Union[int, float]] | |
| args: Dict[str, Any] | |
| class EMAConfig: | |
| enable: bool | |
| decay: float | |
| class NMSConfig: | |
| min_confidence: float | |
| min_iou: float | |
| max_bbox: int | |
| class InferenceConfig: | |
| task: str | |
| nms: NMSConfig | |
| data: DataConfig | |
| fast_inference: Optional[None] | |
| save_predict: bool | |
| class ValidationConfig: | |
| task: str | |
| nms: NMSConfig | |
| data: DataConfig | |
| class TrainConfig: | |
| task: str | |
| epoch: int | |
| data: DataConfig | |
| optimizer: OptimizerConfig | |
| loss: LossConfig | |
| scheduler: SchedulerConfig | |
| ema: EMAConfig | |
| validation: ValidationConfig | |
| class Config: | |
| task: Union[TrainConfig, InferenceConfig, ValidationConfig] | |
| dataset: DatasetConfig | |
| model: ModelConfig | |
| name: str | |
| device: Union[str, int, List[int]] | |
| cpu_num: int | |
| image_size: List[int] | |
| out_path: str | |
| exist_ok: bool | |
| lucky_number: 10 | |
| use_wandb: bool | |
| use_tensorboard: bool | |
| weight: Optional[str] | |
| class YOLOLayer(nn.Module): | |
| source: Union[int, str, List[int]] | |
| output: bool | |
| tags: str | |
| layer_type: str | |
| usable: bool | |
| IDX_TO_ID = [ | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23, | |
| 24, | |
| 25, | |
| 27, | |
| 28, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 35, | |
| 36, | |
| 37, | |
| 38, | |
| 39, | |
| 40, | |
| 41, | |
| 42, | |
| 43, | |
| 44, | |
| 46, | |
| 47, | |
| 48, | |
| 49, | |
| 50, | |
| 51, | |
| 52, | |
| 53, | |
| 54, | |
| 55, | |
| 56, | |
| 57, | |
| 58, | |
| 59, | |
| 60, | |
| 61, | |
| 62, | |
| 63, | |
| 64, | |
| 65, | |
| 67, | |
| 70, | |
| 72, | |
| 73, | |
| 74, | |
| 75, | |
| 76, | |
| 77, | |
| 78, | |
| 79, | |
| 80, | |
| 81, | |
| 82, | |
| 84, | |
| 85, | |
| 86, | |
| 87, | |
| 88, | |
| 89, | |
| 90, | |
| ] | |