SYMBOL INDEX (819 symbols across 44 files) FILE: nn/autobackend.py class AutoBackend (line 21) | class AutoBackend(nn.Module): method __init__ (line 23) | def __init__(self, weights='yolov8n.pt', device=torch.device('cpu'), d... method forward (line 234) | def forward(self, im, augment=False, visualize=False): method from_numpy (line 325) | def from_numpy(self, x): method warmup (line 334) | def warmup(self, imgsz=(1, 3, 640, 640)): method _model_type (line 348) | def _model_type(p='path/to/model.pt'): method _load_metadata (line 368) | def _load_metadata(f=Path('path/to/meta.yaml')): FILE: nn/modules.py function autopad (line 32) | def autopad(k, p=None, d=1): # kernel, padding, dilation class Conv (line 41) | class Conv(nn.Module): method __init__ (line 45) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, d=1, act=True): method forward (line 51) | def forward(self, x): method forward_fuse (line 54) | def forward_fuse(self, x): class DWConv (line 58) | class DWConv(Conv): method __init__ (line 60) | def __init__(self, c1, c2, k=1, s=1, d=1, act=True): # ch_in, ch_out,... class DWConvTranspose2d (line 64) | class DWConvTranspose2d(nn.ConvTranspose2d): method __init__ (line 66) | def __init__(self, c1, c2, k=1, s=1, p1=0, p2=0): # ch_in, ch_out, ke... class ConvTranspose (line 70) | class ConvTranspose(nn.Module): method __init__ (line 74) | def __init__(self, c1, c2, k=2, s=2, p=0, bn=True, act=True): method forward (line 80) | def forward(self, x): class DFL (line 84) | class DFL(nn.Module): method __init__ (line 86) | def __init__(self, c1=16): method forward (line 93) | def forward(self, x): class TransformerLayer (line 99) | class TransformerLayer(nn.Module): method __init__ (line 101) | def __init__(self, c, num_heads): method forward (line 110) | def forward(self, x): class TransformerBlock (line 116) | class TransformerBlock(nn.Module): method __init__ (line 118) | def __init__(self, c1, c2, num_heads, num_layers): method forward (line 127) | def forward(self, x): class Bottleneck (line 135) | class Bottleneck(nn.Module): method __init__ (line 137) | def __init__(self, c1, c2, shortcut=True, g=1, k=(3, 3), e=0.5): # ch... method forward (line 144) | def forward(self, x): class BottleneckCSP (line 148) | class BottleneckCSP(nn.Module): method __init__ (line 150) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 161) | def forward(self, x): class C3 (line 167) | class C3(nn.Module): method __init__ (line 169) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 177) | def forward(self, x): class C2 (line 181) | class C2(nn.Module): method __init__ (line 183) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 191) | def forward(self, x): class C2f (line 196) | class C2f(nn.Module): method __init__ (line 198) | def __init__(self, c1, c2, n=1, shortcut=False, g=1, e=0.5): # ch_in,... method forward (line 205) | def forward(self, x): class ChannelAttention (line 211) | class ChannelAttention(nn.Module): method __init__ (line 213) | def __init__(self, channels: int) -> None: method forward (line 219) | def forward(self, x: torch.Tensor) -> torch.Tensor: class SpatialAttention (line 223) | class SpatialAttention(nn.Module): method __init__ (line 225) | def __init__(self, kernel_size=7): method forward (line 232) | def forward(self, x): class CBAM (line 236) | class CBAM(nn.Module): method __init__ (line 238) | def __init__(self, c1, ratio=16, kernel_size=7): # ch_in, ch_out, num... method forward (line 243) | def forward(self, x): class C1 (line 247) | class C1(nn.Module): method __init__ (line 249) | def __init__(self, c1, c2, n=1): # ch_in, ch_out, number, shortcut, g... method forward (line 254) | def forward(self, x): class C3x (line 259) | class C3x(C3): method __init__ (line 261) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3TR (line 267) | class C3TR(C3): method __init__ (line 269) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3Ghost (line 275) | class C3Ghost(C3): method __init__ (line 277) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class SPP (line 283) | class SPP(nn.Module): method __init__ (line 285) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 292) | def forward(self, x): class SPPF (line 299) | class SPPF(nn.Module): method __init__ (line 301) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 308) | def forward(self, x): class Focus (line 317) | class Focus(nn.Module): method __init__ (line 319) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 324) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class GhostConv (line 329) | class GhostConv(nn.Module): method __init__ (line 331) | def __init__(self, c1, c2, k=1, s=1, g=1, act=True): # ch_in, ch_out,... method forward (line 337) | def forward(self, x): class GhostBottleneck (line 342) | class GhostBottleneck(nn.Module): method __init__ (line 344) | def __init__(self, c1, c2, k=3, s=1): # ch_in, ch_out, kernel, stride method forward (line 354) | def forward(self, x): class Concat (line 358) | class Concat(nn.Module): method __init__ (line 360) | def __init__(self, dimension=1): method forward (line 364) | def forward(self, x): class AutoShape (line 368) | class AutoShape(nn.Module): method __init__ (line 378) | def __init__(self, model, verbose=True): method _apply (line 391) | def _apply(self, fn): method forward (line 403) | def forward(self, ims, size=640, augment=False, profile=False): class Detections (line 467) | class Detections: method __init__ (line 469) | def __init__(self, ims, pred, files, times=(0, 0, 0), names=None, shap... method _run (line 486) | def _run(self, pprint=False, show=False, save=False, crop=False, rende... method show (line 531) | def show(self, labels=True): method save (line 534) | def save(self, labels=True, save_dir='runs/detect/exp', exist_ok=False): method crop (line 538) | def crop(self, save=True, save_dir='runs/detect/exp', exist_ok=False): method render (line 542) | def render(self, labels=True): method pandas (line 546) | def pandas(self): method tolist (line 556) | def tolist(self): method print (line 565) | def print(self): method __len__ (line 568) | def __len__(self): # override len(results) method __str__ (line 571) | def __str__(self): # override print(results) method __repr__ (line 574) | def __repr__(self): class Proto (line 578) | class Proto(nn.Module): method __init__ (line 580) | def __init__(self, c1, c_=256, c2=32): # ch_in, number of protos, num... method forward (line 587) | def forward(self, x): class Ensemble (line 591) | class Ensemble(nn.ModuleList): method __init__ (line 593) | def __init__(self): method forward (line 596) | def forward(self, x, augment=False, profile=False, visualize=False): class Detect (line 605) | class Detect(nn.Module): method __init__ (line 613) | def __init__(self, nc=80, ch=()): # detection layer method forward (line 627) | def forward(self, x): method bias_init (line 642) | def bias_init(self): class Segment (line 652) | class Segment(Detect): method __init__ (line 654) | def __init__(self, nc=80, nm=32, npr=256, ch=()): method forward (line 664) | def forward(self, x): class Classify (line 675) | class Classify(nn.Module): method __init__ (line 677) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1): # ch_in, ch_out, k... method forward (line 685) | def forward(self, x): FILE: nn/tasks.py class BaseModel (line 19) | class BaseModel(nn.Module): method forward (line 24) | def forward(self, x, profile=False, visualize=False): method _forward_once (line 38) | def _forward_once(self, x, profile=False, visualize=False): method _profile_one_layer (line 63) | def _profile_one_layer(self, m, x, dt): method fuse (line 85) | def fuse(self): method info (line 101) | def info(self, verbose=False, imgsz=640): method _apply (line 111) | def _apply(self, fn): method load (line 130) | def load(self, weights): class DetectionModel (line 141) | class DetectionModel(BaseModel): method __init__ (line 143) | def __init__(self, cfg='yolov8n.yaml', ch=3, nc=None, verbose=True): ... method forward (line 172) | def forward(self, x, augment=False, profile=False, visualize=False): method _forward_augment (line 177) | def _forward_augment(self, x): method _descale_pred (line 192) | def _descale_pred(p, flips, scale, img_size, dim=1): method _clip_augmented (line 202) | def _clip_augmented(self, y): method load (line 213) | def load(self, weights, verbose=True): class SegmentationModel (line 221) | class SegmentationModel(DetectionModel): method __init__ (line 223) | def __init__(self, cfg='yolov8n-seg.yaml', ch=3, nc=None, verbose=True): class ClassificationModel (line 227) | class ClassificationModel(BaseModel): method __init__ (line 229) | def __init__(self, method _from_detection_model (line 239) | def _from_detection_model(self, model, nc=1000, cutoff=10): method _from_yaml (line 255) | def _from_yaml(self, cfg, ch, nc, verbose): method load (line 266) | def load(self, weights): method reshape_outputs (line 273) | def reshape_outputs(model, nc): function attempt_load_weights (line 297) | def attempt_load_weights(weights, device=None, inplace=True, fuse=False): function attempt_load_one_weight (line 337) | def attempt_load_one_weight(weight, device=None, inplace=True, fuse=False): function parse_model (line 365) | def parse_model(d, ch, verbose=True): # model_dict, input_channels(3) FILE: yolo/cli.py function cli (line 15) | def cli(cfg): FILE: yolo/configs/__init__.py function get_config (line 11) | def get_config(config: Union[str, DictConfig], overrides: Union[str, Dic... FILE: yolo/configs/hydra_patch.py function override_config (line 15) | def override_config(overrides, cfg): function check_config_mismatch (line 68) | def check_config_mismatch(overrides, cfg): FILE: yolo/data/augment.py class BaseTransform (line 21) | class BaseTransform: method __init__ (line 23) | def __init__(self) -> None: method apply_image (line 26) | def apply_image(self, labels): method apply_instances (line 29) | def apply_instances(self, labels): method apply_semantic (line 32) | def apply_semantic(self, labels): method __call__ (line 35) | def __call__(self, labels): class Compose (line 41) | class Compose: method __init__ (line 43) | def __init__(self, transforms): method __call__ (line 46) | def __call__(self, data): method append (line 51) | def append(self, transform): method tolist (line 54) | def tolist(self): method __repr__ (line 57) | def __repr__(self): class BaseMixTransform (line 66) | class BaseMixTransform: method __init__ (line 69) | def __init__(self, dataset, pre_transform=None, p=0.0) -> None: method __call__ (line 74) | def __call__(self, labels): method _mix_transform (line 96) | def _mix_transform(self, labels): method get_indexes (line 99) | def get_indexes(self): class Mosaic (line 103) | class Mosaic(BaseMixTransform): method __init__ (line 111) | def __init__(self, dataset, imgsz=640, p=1.0, border=(0, 0)): method get_indexes (line 118) | def get_indexes(self): method _mix_transform (line 121) | def _mix_transform(self, labels): method _update_labels (line 158) | def _update_labels(self, labels, padw, padh): method _cat_labels (line 166) | def _cat_labels(self, mosaic_labels): class MixUp (line 184) | class MixUp(BaseMixTransform): method __init__ (line 186) | def __init__(self, dataset, pre_transform=None, p=0.0) -> None: method get_indexes (line 189) | def get_indexes(self): method _mix_transform (line 192) | def _mix_transform(self, labels): class RandomPerspective (line 202) | class RandomPerspective: method __init__ (line 204) | def __init__(self, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, p... method affine_transform (line 213) | def affine_transform(self, img): method apply_bboxes (line 253) | def apply_bboxes(self, bboxes, M): method apply_segments (line 276) | def apply_segments(self, segments, M): method apply_keypoints (line 299) | def apply_keypoints(self, keypoints, M): method __call__ (line 325) | def __call__(self, labels): method box_candidates (line 370) | def box_candidates(self, box1, box2, wh_thr=2, ar_thr=100, area_thr=0.... class RandomHSV (line 378) | class RandomHSV: method __init__ (line 380) | def __init__(self, hgain=0.5, sgain=0.5, vgain=0.5) -> None: method __call__ (line 385) | def __call__(self, labels): class RandomFlip (line 402) | class RandomFlip: method __init__ (line 404) | def __init__(self, p=0.5, direction="horizontal") -> None: method __call__ (line 411) | def __call__(self, labels): class LetterBox (line 431) | class LetterBox: method __init__ (line 434) | def __init__(self, new_shape=(640, 640), auto=False, scaleFill=False, ... method __call__ (line 441) | def __call__(self, labels=None, image=None): method _update_labels (line 486) | def _update_labels(self, labels, ratio, padw, padh): class CopyPaste (line 495) | class CopyPaste: method __init__ (line 497) | def __init__(self, p=0.5) -> None: method __call__ (line 500) | def __call__(self, labels): class Albumentations (line 533) | class Albumentations: method __init__ (line 535) | def __init__(self, p=1.0): method __call__ (line 560) | def __call__(self, labels): class Format (line 577) | class Format: method __init__ (line 579) | def __init__(self, method __call__ (line 595) | def __call__(self, labels): method _format_img (line 624) | def _format_img(self, img): method _format_segments (line 631) | def _format_segments(self, instances, cls, w, h): function mosaic_transforms (line 645) | def mosaic_transforms(dataset, imgsz, hyp): function affine_transforms (line 666) | def affine_transforms(imgsz, hyp): function classify_transforms (line 684) | def classify_transforms(size=224): function classify_albumentations (line 691) | def classify_albumentations( class ClassifyLetterBox (line 734) | class ClassifyLetterBox: method __init__ (line 736) | def __init__(self, size=(640, 640), auto=False, stride=32): method __call__ (line 742) | def __call__(self, im): # im = np.array HWC class CenterCrop (line 753) | class CenterCrop: method __init__ (line 755) | def __init__(self, size=640): method __call__ (line 759) | def __call__(self, im): # im = np.array HWC class ToTensor (line 766) | class ToTensor: method __init__ (line 768) | def __init__(self, half=False): method __call__ (line 772) | def __call__(self, im): # im = np.array HWC in BGR order FILE: yolo/data/base.py class BaseDataset (line 19) | class BaseDataset(Dataset): method __init__ (line 27) | def __init__( method get_img_files (line 75) | def get_img_files(self, img_path): method update_labels (line 99) | def update_labels(self, include_class: Optional[list]): method load_image (line 115) | def load_image(self, i): method cache_images (line 132) | def cache_images(self, cache): method cache_images_to_disk (line 148) | def cache_images_to_disk(self, i): method set_rectangle (line 154) | def set_rectangle(self): method __getitem__ (line 178) | def __getitem__(self, index): method get_label_info (line 181) | def get_label_info(self, index): method __len__ (line 193) | def __len__(self): method update_labels_info (line 196) | def update_labels_info(self, label): method build_transforms (line 200) | def build_transforms(self, hyp=None): method get_labels (line 212) | def get_labels(self): FILE: yolo/data/build.py class InfiniteDataLoader (line 16) | class InfiniteDataLoader(dataloader.DataLoader): method __init__ (line 22) | def __init__(self, *args, **kwargs): method __len__ (line 27) | def __len__(self): method __iter__ (line 30) | def __iter__(self): class _RepeatSampler (line 35) | class _RepeatSampler: method __init__ (line 42) | def __init__(self, sampler): method __iter__ (line 45) | def __iter__(self): function seed_worker (line 50) | def seed_worker(worker_id): function build_dataloader (line 57) | def build_dataloader(cfg, batch_size, img_path, stride=32, label_path=No... function build_classification_dataloader (line 101) | def build_classification_dataloader(path, FILE: yolo/data/dataloaders/stream_loaders.py class LoadStreams (line 21) | class LoadStreams: method __init__ (line 23) | def __init__(self, sources='file.streams', imgsz=640, stride=32, auto=... method update (line 67) | def update(self, i, cap, stream): method __iter__ (line 83) | def __iter__(self): method __next__ (line 87) | def __next__(self): method __len__ (line 103) | def __len__(self): class LoadScreenshots (line 107) | class LoadScreenshots: method __init__ (line 109) | def __init__(self, source, imgsz=640, stride=32, auto=True, transforms... method __iter__ (line 138) | def __iter__(self): method __next__ (line 141) | def __next__(self): class LoadImages (line 156) | class LoadImages: method __init__ (line 158) | def __init__(self, path, imgsz=640, stride=32, auto=True, transforms=N... method __iter__ (line 193) | def __iter__(self): method __next__ (line 197) | def __next__(self): method _new_video (line 237) | def _new_video(self, path): method _cv2_rotate (line 245) | def _cv2_rotate(self, im): method __len__ (line 255) | def __len__(self): FILE: yolo/data/dataloaders/v5augmentations.py class Albumentations (line 24) | class Albumentations: method __init__ (line 26) | def __init__(self, size=640): method __call__ (line 50) | def __call__(self, im, labels, p=1.0): function normalize (line 57) | def normalize(x, mean=IMAGENET_MEAN, std=IMAGENET_STD, inplace=False): function denormalize (line 62) | def denormalize(x, mean=IMAGENET_MEAN, std=IMAGENET_STD): function augment_hsv (line 69) | def augment_hsv(im, hgain=0.5, sgain=0.5, vgain=0.5): function hist_equalize (line 85) | def hist_equalize(im, clahe=True, bgr=False): function replicate (line 96) | def replicate(im, labels): function letterbox (line 113) | def letterbox(im, new_shape=(640, 640), color=(114, 114, 114), auto=True... function random_perspective (line 146) | def random_perspective(im, function copy_paste (line 242) | def copy_paste(im, labels, segments, p=0.5): function cutout (line 267) | def cutout(im, labels, p=0.5): function mixup (line 294) | def mixup(im, labels, im2, labels2): function box_candidates (line 302) | def box_candidates(box1, box2, wh_thr=2, ar_thr=100, area_thr=0.1, eps=1... function classify_albumentations (line 310) | def classify_albumentations( function classify_transforms (line 352) | def classify_transforms(size=224): class LetterBox (line 359) | class LetterBox: method __init__ (line 361) | def __init__(self, size=(640, 640), auto=False, stride=32): method __call__ (line 367) | def __call__(self, im): # im = np.array HWC class CenterCrop (line 378) | class CenterCrop: method __init__ (line 380) | def __init__(self, size=640): method __call__ (line 384) | def __call__(self, im): # im = np.array HWC class ToTensor (line 391) | class ToTensor: method __init__ (line 393) | def __init__(self, half=False): method __call__ (line 397) | def __call__(self, im): # im = np.array HWC in BGR order FILE: yolo/data/dataloaders/v5loader.py function get_hash (line 54) | def get_hash(paths): function exif_size (line 62) | def exif_size(img): function exif_transpose (line 72) | def exif_transpose(image): function seed_worker (line 98) | def seed_worker(worker_id): function create_dataloader (line 105) | def create_dataloader(path, class InfiniteDataLoader (line 160) | class InfiniteDataLoader(dataloader.DataLoader): method __init__ (line 166) | def __init__(self, *args, **kwargs): method __len__ (line 171) | def __len__(self): method __iter__ (line 174) | def __iter__(self): class _RepeatSampler (line 179) | class _RepeatSampler: method __init__ (line 186) | def __init__(self, sampler): method __iter__ (line 189) | def __iter__(self): class LoadScreenshots (line 194) | class LoadScreenshots: method __init__ (line 196) | def __init__(self, source, img_size=640, stride=32, auto=True, transfo... method __iter__ (line 225) | def __iter__(self): method __next__ (line 228) | def __next__(self): class LoadImages (line 243) | class LoadImages: method __init__ (line 245) | def __init__(self, path, img_size=640, stride=32, auto=True, transform... method __iter__ (line 280) | def __iter__(self): method __next__ (line 284) | def __next__(self): method _new_video (line 324) | def _new_video(self, path): method _cv2_rotate (line 332) | def _cv2_rotate(self, im): method __len__ (line 342) | def __len__(self): class LoadStreams (line 346) | class LoadStreams: method __init__ (line 348) | def __init__(self, sources='file.streams', img_size=640, stride=32, au... method update (line 392) | def update(self, i, cap, stream): method __iter__ (line 408) | def __iter__(self): method __next__ (line 412) | def __next__(self): method __len__ (line 428) | def __len__(self): function img2label_paths (line 432) | def img2label_paths(img_paths): class LoadImagesAndLabels (line 438) | class LoadImagesAndLabels(Dataset): method __init__ (line 443) | def __init__(self, method check_cache_ram (line 593) | def check_cache_ram(self, safety_margin=0.1, prefix=''): method cache_labels (line 610) | def cache_labels(self, path=Path('./labels.cache'), prefix=''): method __len__ (line 648) | def __len__(self): method __getitem__ (line 657) | def __getitem__(self, index): method load_image (line 731) | def load_image(self, i): method cache_images_to_disk (line 748) | def cache_images_to_disk(self, i): method load_mosaic (line 754) | def load_mosaic(self, index): method load_mosaic9 (line 812) | def load_mosaic9(self, index): method collate_fn (line 890) | def collate_fn(batch): method collate_fn_old (line 906) | def collate_fn_old(batch): function flatten_recursive (line 915) | def flatten_recursive(path=DATASETS_DIR / 'coco128'): function extract_boxes (line 925) | def extract_boxes(path=DATASETS_DIR / 'coco128'): # from utils.dataload... function autosplit (line 959) | def autosplit(path=DATASETS_DIR / 'coco128/images', weights=(0.9, 0.1, 0... function verify_image_label (line 985) | def verify_image_label(args): class HUBDatasetStats (line 1037) | class HUBDatasetStats(): method __init__ (line 1052) | def __init__(self, path='coco128.yaml', autodownload=False): method _find_yaml (line 1071) | def _find_yaml(dir): method _unzip (line 1081) | def _unzip(self, path): method _hub_ops (line 1091) | def _hub_ops(self, f, max_dim=1920): method get_json (line 1109) | def get_json(self, save=False, verbose=False): method process_images (line 1144) | def process_images(self): class ClassificationDataset (line 1158) | class ClassificationDataset(torchvision.datasets.ImageFolder): method __init__ (line 1167) | def __init__(self, root, augment, imgsz, cache=False): method __getitem__ (line 1175) | def __getitem__(self, i): function create_classification_dataloader (line 1192) | def create_classification_dataloader(path, FILE: yolo/data/dataset.py class YOLODataset (line 16) | class YOLODataset(BaseDataset): method __init__ (line 25) | def __init__( method cache_labels (line 48) | def cache_labels(self, path=Path("./labels.cache")): method get_labels (line 100) | def get_labels(self): method build_transforms (line 127) | def build_transforms(self, hyp=None): method close_mosaic (line 141) | def close_mosaic(self, hyp): method update_labels_info (line 150) | def update_labels_info(self, label): method collate_fn (line 163) | def collate_fn(batch): class ClassificationDataset (line 184) | class ClassificationDataset(torchvision.datasets.ImageFolder): method __init__ (line 193) | def __init__(self, root, augment, imgsz, cache=False): method __getitem__ (line 201) | def __getitem__(self, i): method __len__ (line 217) | def __len__(self) -> int: class SemanticDataset (line 222) | class SemanticDataset(BaseDataset): method __init__ (line 224) | def __init__(self): FILE: yolo/data/dataset_wrappers.py class MixAndRectDataset (line 9) | class MixAndRectDataset: method __init__ (line 17) | def __init__(self, dataset): method __len__ (line 21) | def __len__(self): method __getitem__ (line 24) | def __getitem__(self, index): FILE: yolo/data/utils.py function img2label_paths (line 39) | def img2label_paths(img_paths): function get_hash (line 45) | def get_hash(paths): function exif_size (line 53) | def exif_size(img): function verify_image_label (line 63) | def verify_image_label(args): function polygon2mask (line 133) | def polygon2mask(imgsz, polygons, color=1, downsample_ratio=1): function polygons2masks (line 154) | def polygons2masks(imgsz, polygons, color, downsample_ratio=1): function polygons2masks_overlap (line 169) | def polygons2masks_overlap(imgsz, segments, downsample_ratio=1): function check_dataset_yaml (line 194) | def check_dataset_yaml(data, autodownload=True): function check_dataset (line 259) | def check_dataset(dataset: str): FILE: yolo/engine/exporter.py function export_formats (line 83) | def export_formats(): function try_export (line 101) | def try_export(inner_func): class Exporter (line 119) | class Exporter: method __init__ (line 130) | def __init__(self, config=DEFAULT_CONFIG, overrides=None): method __call__ (line 145) | def __call__(self, model=None): method _export_torchscript (line 258) | def _export_torchscript(self, prefix=colorstr('TorchScript:')): method _export_onnx (line 275) | def _export_onnx(self, prefix=colorstr('ONNX:')): method _export_openvino (line 328) | def _export_openvino(self, prefix=colorstr('OpenVINO:')): method _export_paddle (line 343) | def _export_paddle(self, prefix=colorstr('PaddlePaddle:')): method _export_coreml (line 357) | def _export_coreml(self, prefix=colorstr('CoreML:')): method _export_engine (line 397) | def _export_engine(self, workspace=4, verbose=False, prefix=colorstr('... method _export_saved_model (line 454) | def _export_saved_model(self, method _export_saved_model_OLD (line 488) | def _export_saved_model_OLD(self, method _export_pb (line 535) | def _export_pb(self, keras_model, file, prefix=colorstr('TensorFlow Gr... method _export_tflite (line 551) | def _export_tflite(self, keras_model, int8, data, nms, agnostic_nms, p... method _export_edgetpu (line 591) | def _export_edgetpu(self, prefix=colorstr('Edge TPU:')): method _export_tfjs (line 617) | def _export_tfjs(self, prefix=colorstr('TensorFlow.js:')): method _add_tflite_metadata (line 643) | def _add_tflite_metadata(self, file, num_outputs): method _pipeline_coreml (line 675) | def _pipeline_coreml(self, model, prefix=colorstr('CoreML Pipeline:')): method run_callbacks (line 796) | def run_callbacks(self, event: str): function export (line 802) | def export(cfg): FILE: yolo/engine/model.py class YOLO (line 26) | class YOLO: method __init__ (line 33) | def __init__(self, model='yolov8n.yaml', type="v8") -> None: method __call__ (line 57) | def __call__(self, source, **kwargs): method _new (line 60) | def _new(self, cfg: str, verbose=True): method _load (line 76) | def _load(self, weights: str): method reset (line 91) | def reset(self): method info (line 101) | def info(self, verbose=False): method fuse (line 110) | def fuse(self): method predict (line 114) | def predict(self, source, **kwargs): method val (line 134) | def val(self, data=None, **kwargs): method export (line 153) | def export(self, **kwargs): method train (line 169) | def train(self, **kwargs): method to (line 195) | def to(self, device): method _guess_ops_from_task (line 204) | def _guess_ops_from_task(self, task): method _reset_ckpt_args (line 214) | def _reset_ckpt_args(args): FILE: yolo/engine/predictor.py class BasePredictor (line 44) | class BasePredictor: method __init__ (line 64) | def __init__(self, config=DEFAULT_CONFIG, overrides=None): method preprocess (line 98) | def preprocess(self, img): method get_annotator (line 101) | def get_annotator(self, img): method get_tracker (line 104) | def get_tracker(self,img): method write_results (line 106) | def write_results(self, pred, batch, print_string): method postprocess (line 109) | def postprocess(self, preds, img, orig_img): method setup (line 112) | def setup(self, source=None, model=None): method __call__ (line 170) | def __call__(self, source=None, model=None): method show (line 224) | def show(self, p): method save_preds (line 233) | def save_preds(self, vid_cap, idx, save_path): method run_callbacks (line 253) | def run_callbacks(self, event: str): FILE: yolo/engine/sort.py function linear_assignment (line 18) | def linear_assignment(cost_matrix): function iou_batch (line 30) | def iou_batch(bb_test, bb_gt): function convert_bbox_to_z (line 48) | def convert_bbox_to_z(bbox): function convert_x_to_bbox (line 61) | def convert_x_to_bbox(x, score=None): class KalmanBoxTracker (line 70) | class KalmanBoxTracker(object): method __init__ (line 73) | def __init__(self, bbox): method update (line 108) | def update(self, bbox): method predict (line 123) | def predict(self): method get_state (line 143) | def get_state(self): function associate_detections_to_trackers (line 160) | def associate_detections_to_trackers(detections, trackers, iou_threshold... class Sort (line 209) | class Sort(object): method __init__ (line 210) | def __init__(self, max_age=1, min_hits=3, iou_threshold=0.3): method getTrackers (line 219) | def getTrackers(self,): method update (line 222) | def update(self, dets= np.empty((0,6))): function parse_args (line 272) | def parse_args(): FILE: yolo/engine/trainer.py class BaseTrainer (line 39) | class BaseTrainer: method __init__ (line 76) | def __init__(self, config=DEFAULT_CONFIG, overrides=None): method add_callback (line 150) | def add_callback(self, event: str, callback): method set_callback (line 156) | def set_callback(self, event: str, callback): method run_callbacks (line 162) | def run_callbacks(self, event: str): method train (line 166) | def train(self): method _setup_ddp (line 179) | def _setup_ddp(self, rank, world_size): method _setup_train (line 187) | def _setup_train(self, rank, world_size): method _do_train (line 235) | def _do_train(self, rank=-1, world_size=1): method save_model (line 358) | def save_model(self): method get_dataset (line 376) | def get_dataset(self, data): method setup_model (line 382) | def setup_model(self): method optimizer_step (line 399) | def optimizer_step(self): method preprocess_batch (line 408) | def preprocess_batch(self, batch): method validate (line 414) | def validate(self): method log (line 424) | def log(self, text, rank=-1): method get_model (line 436) | def get_model(self, cfg=None, weights=None, verbose=True): method get_validator (line 439) | def get_validator(self): method get_dataloader (line 442) | def get_dataloader(self, dataset_path, batch_size=16, rank=0): method criterion (line 448) | def criterion(self, preds, batch): method label_loss_items (line 454) | def label_loss_items(self, loss_items=None, prefix="train"): method set_model_attributes (line 461) | def set_model_attributes(self): method build_targets (line 467) | def build_targets(self, preds, targets): method progress_string (line 470) | def progress_string(self): method plot_training_samples (line 474) | def plot_training_samples(self, batch, ni): method save_metrics (line 477) | def save_metrics(self, metrics): method plot_metrics (line 484) | def plot_metrics(self): method final_eval (line 487) | def final_eval(self): method check_resume (line 498) | def check_resume(self): method resume_training (line 509) | def resume_training(self, ckpt): method build_optimizer (line 534) | def build_optimizer(model, name='Adam', lr=0.001, momentum=0.9, decay=... FILE: yolo/engine/validator.py class BaseValidator (line 20) | class BaseValidator: method __init__ (line 41) | def __init__(self, dataloader=None, save_dir=None, pbar=None, logger=N... method __call__ (line 76) | def __call__(self, trainer=None, model=None): method run_callbacks (line 178) | def run_callbacks(self, event: str): method get_dataloader (line 182) | def get_dataloader(self, dataset_path, batch_size): method preprocess (line 185) | def preprocess(self, batch): method postprocess (line 188) | def postprocess(self, preds): method init_metrics (line 191) | def init_metrics(self, model): method update_metrics (line 194) | def update_metrics(self, preds, batch): method get_stats (line 197) | def get_stats(self): method check_stats (line 200) | def check_stats(self, stats): method print_results (line 203) | def print_results(self): method get_desc (line 206) | def get_desc(self): method metric_keys (line 210) | def metric_keys(self): method plot_val_samples (line 214) | def plot_val_samples(self, batch, ni): method plot_predictions (line 217) | def plot_predictions(self, batch, preds, ni): method pred_to_json (line 220) | def pred_to_json(self, preds, batch): method eval_json (line 223) | def eval_json(self, stats): FILE: yolo/utils/__init__.py function is_colab (line 77) | def is_colab(): function is_kaggle (line 88) | def is_kaggle(): function is_jupyter_notebook (line 98) | def is_jupyter_notebook(): function is_docker (line 115) | def is_docker() -> bool: function is_git_directory (line 126) | def is_git_directory() -> bool: function is_pip_package (line 142) | def is_pip_package(filepath: str = __name__) -> bool: function is_dir_writeable (line 161) | def is_dir_writeable(dir_path: str) -> bool: function get_git_root_dir (line 179) | def get_git_root_dir(): function get_default_args (line 191) | def get_default_args(func): function get_user_config_dir (line 197) | def get_user_config_dir(sub_dir='Ultralytics'): function emojis (line 233) | def emojis(string=''): function colorstr (line 238) | def colorstr(*input): function set_logging (line 264) | def set_logging(name=LOGGING_NAME, verbose=True): class TryExcept (line 286) | class TryExcept(contextlib.ContextDecorator): method __init__ (line 288) | def __init__(self, msg=''): method __enter__ (line 291) | def __enter__(self): method __exit__ (line 294) | def __exit__(self, exc_type, value, traceback): function threaded (line 300) | def threaded(func): function yaml_save (line 310) | def yaml_save(file='data.yaml', data=None): function yaml_load (line 331) | def yaml_load(file='data.yaml', append_filename=False): function get_settings (line 347) | def get_settings(file=USER_CONFIG_DIR / 'settings.yaml'): function set_settings (line 400) | def set_settings(kwargs, file=USER_CONFIG_DIR / 'settings.yaml'): FILE: yolo/utils/autobatch.py function check_train_batch_size (line 15) | def check_train_batch_size(model, imgsz=640, amp=True): function autobatch (line 21) | def autobatch(model, imgsz=640, fraction=0.7, batch_size=16): FILE: yolo/utils/callbacks/base.py function on_pretrain_routine_start (line 8) | def on_pretrain_routine_start(trainer): function on_pretrain_routine_end (line 12) | def on_pretrain_routine_end(trainer): function on_train_start (line 16) | def on_train_start(trainer): function on_train_epoch_start (line 20) | def on_train_epoch_start(trainer): function on_train_batch_start (line 24) | def on_train_batch_start(trainer): function optimizer_step (line 28) | def optimizer_step(trainer): function on_before_zero_grad (line 32) | def on_before_zero_grad(trainer): function on_train_batch_end (line 36) | def on_train_batch_end(trainer): function on_train_epoch_end (line 40) | def on_train_epoch_end(trainer): function on_fit_epoch_end (line 44) | def on_fit_epoch_end(trainer): function on_model_save (line 48) | def on_model_save(trainer): function on_train_end (line 52) | def on_train_end(trainer): function on_params_update (line 56) | def on_params_update(trainer): function teardown (line 60) | def teardown(trainer): function on_val_start (line 65) | def on_val_start(validator): function on_val_batch_start (line 69) | def on_val_batch_start(validator): function on_val_batch_end (line 73) | def on_val_batch_end(validator): function on_val_end (line 77) | def on_val_end(validator): function on_predict_start (line 82) | def on_predict_start(predictor): function on_predict_batch_start (line 86) | def on_predict_batch_start(predictor): function on_predict_batch_end (line 90) | def on_predict_batch_end(predictor): function on_predict_end (line 94) | def on_predict_end(predictor): function on_export_start (line 99) | def on_export_start(exporter): function on_export_end (line 103) | def on_export_end(exporter): function add_integration_callbacks (line 141) | def add_integration_callbacks(instance): FILE: yolo/utils/callbacks/clearml.py function _log_images (line 14) | def _log_images(imgs_dict, group="", step=0): function on_pretrain_routine_start (line 21) | def on_pretrain_routine_start(trainer): function on_train_epoch_end (line 32) | def on_train_epoch_end(trainer): function on_fit_epoch_end (line 37) | def on_fit_epoch_end(trainer): function on_train_end (line 46) | def on_train_end(trainer): FILE: yolo/utils/callbacks/comet.py function on_pretrain_routine_start (line 12) | def on_pretrain_routine_start(trainer): function on_train_epoch_end (line 17) | def on_train_epoch_end(trainer): function on_fit_epoch_end (line 25) | def on_fit_epoch_end(trainer): function on_train_end (line 36) | def on_train_end(trainer): FILE: yolo/utils/callbacks/hub.py function on_pretrain_routine_end (line 12) | def on_pretrain_routine_end(trainer): function on_fit_epoch_end (line 20) | def on_fit_epoch_end(trainer): function on_model_save (line 30) | def on_model_save(trainer): function on_train_end (line 41) | def on_train_end(trainer): function on_train_start (line 52) | def on_train_start(trainer): function on_val_start (line 56) | def on_val_start(validator): function on_predict_start (line 60) | def on_predict_start(predictor): function on_export_start (line 64) | def on_export_start(exporter): FILE: yolo/utils/callbacks/tensorboard.py function _log_scalars (line 8) | def _log_scalars(scalars, step=0): function on_pretrain_routine_start (line 13) | def on_pretrain_routine_start(trainer): function on_batch_end (line 18) | def on_batch_end(trainer): function on_fit_epoch_end (line 22) | def on_fit_epoch_end(trainer): FILE: yolo/utils/checks.py function is_ascii (line 21) | def is_ascii(s) -> bool: function check_imgsz (line 38) | def check_imgsz(imgsz, stride=32, min_dim=1, floor=0): function check_version (line 72) | def check_version(current: str = "0.0.0", function check_font (line 103) | def check_font(font: str = FONT, progress: bool = False) -> None: function check_online (line 127) | def check_online() -> bool: function check_python (line 143) | def check_python(minimum: str = '3.7.0') -> bool: function check_requirements (line 157) | def check_requirements(requirements=ROOT.parent / 'requirements.txt', ex... function check_suffix (line 191) | def check_suffix(file='yolov8n.pt', suffix=('.pt',), msg=''): function check_file (line 202) | def check_file(file, suffix=''): function check_yaml (line 227) | def check_yaml(file, suffix=('.yaml', '.yml')): function check_imshow (line 232) | def check_imshow(warn=False): function git_describe (line 248) | def git_describe(path=ROOT): # path must be a directory function print_args (line 257) | def print_args(args: Optional[dict] = None, show_file=True, show_func=Fa... FILE: yolo/utils/dist.py function find_free_network_port (line 12) | def find_free_network_port() -> int: function generate_ddp_file (line 26) | def generate_ddp_file(trainer): function generate_ddp_command (line 47) | def generate_ddp_command(world_size, trainer): function ddp_cleanup (line 58) | def ddp_cleanup(command, trainer): FILE: yolo/utils/downloads.py function safe_download (line 18) | def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''): function is_url (line 39) | def is_url(url, check=True): function attempt_download (line 50) | def attempt_download(file, repo='ultralytics/assets', release='v0.0.0'): function download (line 100) | def download(url, dir=Path.cwd(), unzip=True, delete=True, curl=False, t... FILE: yolo/utils/files.py class WorkingDirectory (line 12) | class WorkingDirectory(contextlib.ContextDecorator): method __init__ (line 14) | def __init__(self, new_dir): method __enter__ (line 18) | def __enter__(self): method __exit__ (line 21) | def __exit__(self, exc_type, exc_val, exc_tb): function increment_path (line 25) | def increment_path(path, exist_ok=False, sep='', mkdir=False): function unzip_file (line 60) | def unzip_file(file, path=None, exclude=('.DS_Store', '__MACOSX')): function file_age (line 70) | def file_age(path=__file__): function file_date (line 76) | def file_date(path=__file__): function file_size (line 82) | def file_size(path): function url2file (line 94) | def url2file(url): function get_latest_run (line 100) | def get_latest_run(search_dir='.'): FILE: yolo/utils/instance.py function _ntuple (line 14) | def _ntuple(n): class Bboxes (line 32) | class Bboxes: method __init__ (line 35) | def __init__(self, bboxes, format="xyxy") -> None: method convert (line 66) | def convert(self, format): method areas (line 79) | def areas(self): method mul (line 99) | def mul(self, scale): method add (line 113) | def add(self, offset): method __len__ (line 127) | def __len__(self): method concatenate (line 131) | def concatenate(cls, boxes_list: List["Bboxes"], axis=0) -> "Bboxes": method __getitem__ (line 150) | def __getitem__(self, index) -> "Bboxes": class Instances (line 165) | class Instances: method __init__ (line 167) | def __init__(self, bboxes, segments=None, keypoints=None, bbox_format=... method convert_bbox (line 189) | def convert_bbox(self, format): method bbox_areas (line 192) | def bbox_areas(self): method scale (line 195) | def scale(self, scale_w, scale_h, bbox_only=False): method denormalize (line 206) | def denormalize(self, w, h): method normalize (line 217) | def normalize(self, w, h): method add_padding (line 228) | def add_padding(self, padw, padh): method __getitem__ (line 238) | def __getitem__(self, index) -> "Instances": method flipud (line 258) | def flipud(self, h): method fliplr (line 270) | def fliplr(self, w): method clip (line 282) | def clip(self, w, h): method update (line 295) | def update(self, bboxes, segments=None, keypoints=None): method __len__ (line 303) | def __len__(self): method concatenate (line 307) | def concatenate(cls, instances_list: List["Instances"], axis=0) -> "In... method bboxes (line 336) | def bboxes(self): FILE: yolo/utils/loss.py class VarifocalLoss (line 11) | class VarifocalLoss(nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 16) | def forward(self, pred_score, gt_score, label, alpha=0.75, gamma=2.0): class BboxLoss (line 24) | class BboxLoss(nn.Module): method __init__ (line 26) | def __init__(self, reg_max, use_dfl=False): method forward (line 31) | def forward(self, pred_dist, pred_bboxes, anchor_points, target_bboxes... method _df_loss (line 48) | def _df_loss(pred_dist, target): FILE: yolo/utils/metrics.py function box_area (line 18) | def box_area(box): function bbox_ioa (line 23) | def bbox_ioa(box1, box2, eps=1e-7): function box_iou (line 45) | def box_iou(box1, box2, eps=1e-7): function bbox_iou (line 66) | def bbox_iou(box1, box2, xywh=True, GIoU=False, DIoU=False, CIoU=False, ... function mask_iou (line 107) | def mask_iou(mask1, mask2, eps=1e-7): function masks_iou (line 119) | def masks_iou(mask1, mask2, eps=1e-7): function smooth_BCE (line 131) | def smooth_BCE(eps=0.1): # https://github.com/ultralytics/yolov3/issues... class FocalLoss (line 137) | class FocalLoss(nn.Module): method __init__ (line 139) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 147) | def forward(self, pred, true): class ConfusionMatrix (line 167) | class ConfusionMatrix: method __init__ (line 169) | def __init__(self, nc, conf=0.25, iou_thres=0.45): method process_batch (line 175) | def process_batch(self, detections, labels): method matrix (line 221) | def matrix(self): method tp_fp (line 224) | def tp_fp(self): method plot (line 231) | def plot(self, normalize=True, save_dir='', names=()): method print (line 261) | def print(self): function smooth (line 266) | def smooth(y, f=0.05): function plot_pr_curve (line 274) | def plot_pr_curve(px, py, ap, save_dir=Path('pr_curve.png'), names=()): function plot_mc_curve (line 296) | def plot_mc_curve(px, py, save_dir=Path('mc_curve.png'), names=(), xlabe... function compute_ap (line 318) | def compute_ap(recall, precision): function ap_per_class (line 346) | def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir=Pa... class Metric (line 413) | class Metric: method __init__ (line 415) | def __init__(self) -> None: method ap50 (line 423) | def ap50(self): method ap (line 431) | def ap(self): method mp (line 439) | def mp(self): method mr (line 447) | def mr(self): method map50 (line 455) | def map50(self): method map (line 463) | def map(self): method mean_results (line 470) | def mean_results(self): method class_result (line 474) | def class_result(self, i): method get_maps (line 478) | def get_maps(self, nc): method fitness (line 484) | def fitness(self): method update (line 489) | def update(self, results): class DetMetrics (line 497) | class DetMetrics: method __init__ (line 499) | def __init__(self, save_dir=Path("."), plot=False, names=()) -> None: method process (line 505) | def process(self, tp, conf, pred_cls, target_cls): method keys (line 511) | def keys(self): method mean_results (line 514) | def mean_results(self): method class_result (line 517) | def class_result(self, i): method get_maps (line 520) | def get_maps(self, nc): method fitness (line 524) | def fitness(self): method ap_class_index (line 528) | def ap_class_index(self): method results_dict (line 532) | def results_dict(self): class SegmentMetrics (line 536) | class SegmentMetrics: method __init__ (line 538) | def __init__(self, save_dir=Path("."), plot=False, names=()) -> None: method process (line 545) | def process(self, tp_m, tp_b, conf, pred_cls, target_cls): method keys (line 566) | def keys(self): method mean_results (line 571) | def mean_results(self): method class_result (line 574) | def class_result(self, i): method get_maps (line 577) | def get_maps(self, nc): method fitness (line 581) | def fitness(self): method ap_class_index (line 585) | def ap_class_index(self): method results_dict (line 590) | def results_dict(self): class ClassifyMetrics (line 594) | class ClassifyMetrics: method __init__ (line 596) | def __init__(self) -> None: method process (line 600) | def process(self, targets, pred): method fitness (line 608) | def fitness(self): method results_dict (line 612) | def results_dict(self): method keys (line 616) | def keys(self): FILE: yolo/utils/ops.py class Profile (line 19) | class Profile(contextlib.ContextDecorator): method __init__ (line 21) | def __init__(self, t=0.0): method __enter__ (line 25) | def __enter__(self): method __exit__ (line 29) | def __exit__(self, type, value, traceback): method time (line 33) | def time(self): function coco80_to_coco91_class (line 39) | def coco80_to_coco91_class(): # converts 80-index (val2014) to 91-index... function segment2box (line 51) | def segment2box(segment, width=640, height=640): function scale_boxes (line 70) | def scale_boxes(img1_shape, boxes, img0_shape, ratio_pad=None): function make_divisible (line 97) | def make_divisible(x, divisor): function non_max_suppression (line 104) | def non_max_suppression( function clip_boxes (line 232) | def clip_boxes(boxes, shape): function clip_coords (line 251) | def clip_coords(boxes, shape): function scale_image (line 263) | def scale_image(im1_shape, masks, im0_shape, ratio_pad=None): function xyxy2xywh (line 298) | def xyxy2xywh(x): function xywh2xyxy (line 317) | def xywh2xyxy(x): function xywhn2xyxy (line 335) | def xywhn2xyxy(x, w=640, h=640, padw=0, padh=0): function xyxy2xywhn (line 357) | def xyxy2xywhn(x, w=640, h=640, clip=False, eps=0.0): function xyn2xy (line 382) | def xyn2xy(x, w=640, h=640, padw=0, padh=0): function xywh2ltwh (line 402) | def xywh2ltwh(x): function xyxy2ltwh (line 418) | def xyxy2ltwh(x): function ltwh2xywh (line 434) | def ltwh2xywh(x): function ltwh2xyxy (line 447) | def ltwh2xyxy(x): function segments2boxes (line 464) | def segments2boxes(segments): function resample_segments (line 482) | def resample_segments(segments, n=1000): function crop_mask (line 502) | def crop_mask(masks, boxes): function process_mask_upsample (line 521) | def process_mask_upsample(protos, masks_in, bboxes, shape): function process_mask (line 542) | def process_mask(protos, masks_in, bboxes, shape, upsample=False): function process_mask_native (line 573) | def process_mask_native(protos, masks_in, bboxes, shape): function scale_segments (line 599) | def scale_segments(img1_shape, segments, img0_shape, ratio_pad=None, nor... function masks2segments (line 630) | def masks2segments(masks, strategy='largest'): function clip_segments (line 655) | def clip_segments(segments, shape): function clean_str (line 672) | def clean_str(s): FILE: yolo/utils/plotting.py class Colors (line 22) | class Colors: method __init__ (line 24) | def __init__(self): method __call__ (line 31) | def __call__(self, i, bgr=False): method hex2rgb (line 36) | def hex2rgb(h): # rgb order (PIL) class Annotator (line 43) | class Annotator: method __init__ (line 45) | def __init__(self, im, line_width=None, font_size=None, font='Arial.tt... method box_label (line 58) | def box_label(self, box, label='', color=(128, 128, 128), txt_color=(2... method masks (line 89) | def masks(self, masks, colors, im_gpu, alpha=0.5, retina_masks=False): method rectangle (line 120) | def rectangle(self, xy, fill=None, outline=None, width=1): method text (line 124) | def text(self, xy, text, txt_color=(255, 255, 255), anchor='top'): method fromarray (line 131) | def fromarray(self, im): method result (line 136) | def result(self): function check_pil_font (line 141) | def check_pil_font(font=FONT, size=10): function save_one_box (line 157) | def save_one_box(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=10, squar... function plot_images (line 176) | def plot_images(images, function plot_results (line 280) | def plot_results(file='path/to/results.csv', dir='', segment=False): function output_to_target (line 311) | def output_to_target(output, max_det=300): FILE: yolo/utils/tal.py function select_candidates_in_gts (line 13) | def select_candidates_in_gts(xy_centers, gt_bboxes, eps=1e-9): function select_highest_overlaps (line 30) | def select_highest_overlaps(mask_pos, overlaps, n_max_boxes): class TaskAlignedAssigner (line 56) | class TaskAlignedAssigner(nn.Module): method __init__ (line 58) | def __init__(self, topk=13, num_classes=80, alpha=1.0, beta=6.0, eps=1... method forward (line 68) | def forward(self, pd_scores, pd_bboxes, anc_points, gt_labels, gt_bbox... method get_pos_mask (line 111) | def get_pos_mask(self, pd_scores, pd_bboxes, gt_labels, gt_bboxes, anc... method get_box_metrics (line 124) | def get_box_metrics(self, pd_scores, pd_bboxes, gt_labels, gt_bboxes): method select_topk_candidates (line 135) | def select_topk_candidates(self, metrics, largest=True, topk_mask=None): method get_targets (line 155) | def get_targets(self, gt_labels, gt_bboxes, target_gt_idx, fg_mask): function make_anchors (line 181) | def make_anchors(feats, strides, grid_cell_offset=0.5): function dist2bbox (line 196) | def dist2bbox(distance, anchor_points, xywh=True, dim=-1): function bbox2dist (line 208) | def bbox2dist(anchor_points, bbox, reg_max): FILE: yolo/utils/torch_utils.py function torch_distributed_zero_first (line 32) | def torch_distributed_zero_first(local_rank: int): function smart_inference_mode (line 42) | def smart_inference_mode(torch_1_9=check_version(torch.__version__, '1.9... function DDP_model (line 50) | def DDP_model(model): function select_device (line 61) | def select_device(device='', batch_size=0, newline=False): function time_sync (line 97) | def time_sync(): function fuse_conv_and_bn (line 104) | def fuse_conv_and_bn(conv, bn): function model_info (line 128) | def model_info(model, verbose=False, imgsz=640): function get_num_params (line 145) | def get_num_params(model): function get_num_gradients (line 149) | def get_num_gradients(model): function get_flops (line 153) | def get_flops(model, imgsz=640): function initialize_weights (line 167) | def initialize_weights(model): function scale_img (line 179) | def scale_img(img, ratio=1.0, same_shape=False, gs=32): # img(16,3,256,... function make_divisible (line 191) | def make_divisible(x, divisor): function copy_attr (line 198) | def copy_attr(a, b, include=(), exclude=()): function intersect_dicts (line 207) | def intersect_dicts(da, db, exclude=()): function is_parallel (line 212) | def is_parallel(model): function de_parallel (line 217) | def de_parallel(model): function one_cycle (line 222) | def one_cycle(y1=0.0, y2=1.0, steps=100): function init_seeds (line 227) | def init_seeds(seed=0, deterministic=False): class ModelEMA (line 242) | class ModelEMA: method __init__ (line 248) | def __init__(self, model, decay=0.9999, tau=2000, updates=0): method update (line 256) | def update(self, model): method update_attr (line 268) | def update_attr(self, model, include=(), exclude=('process_group', 're... function strip_optimizer (line 273) | def strip_optimizer(f='best.pt', s=''): function guess_task_from_head (line 306) | def guess_task_from_head(head): function profile (line 321) | def profile(input, ops, n=10, device=None): FILE: yolo/v8/detect/detect_and_trk.py function init_tracker (line 13) | def init_tracker(): function draw_boxes (line 23) | def draw_boxes(img, bbox, identities=None, categories=None, names=None, ... function random_color_list (line 42) | def random_color_list(): class DetectionPredictor (line 55) | class DetectionPredictor(BasePredictor): method get_annotator (line 57) | def get_annotator(self, img): method preprocess (line 60) | def preprocess(self, img): method postprocess (line 66) | def postprocess(self, preds, img, orig_img): method write_results (line 79) | def write_results(self, idx, preds, batch): function predict (line 141) | def predict(cfg): FILE: yolo/v8/detect/predict.py class DetectionPredictor (line 12) | class DetectionPredictor(BasePredictor): method get_annotator (line 14) | def get_annotator(self, img): method preprocess (line 17) | def preprocess(self, img): method postprocess (line 23) | def postprocess(self, preds, img, orig_img): method write_results (line 36) | def write_results(self, idx, preds, batch): function predict (line 87) | def predict(cfg): FILE: yolo/v8/detect/sort.py function linear_assignment (line 18) | def linear_assignment(cost_matrix): function iou_batch (line 30) | def iou_batch(bb_test, bb_gt): function convert_bbox_to_z (line 48) | def convert_bbox_to_z(bbox): function convert_x_to_bbox (line 61) | def convert_x_to_bbox(x, score=None): class KalmanBoxTracker (line 70) | class KalmanBoxTracker(object): method __init__ (line 73) | def __init__(self, bbox): method update (line 108) | def update(self, bbox): method predict (line 123) | def predict(self): method get_state (line 143) | def get_state(self): function associate_detections_to_trackers (line 160) | def associate_detections_to_trackers(detections, trackers, iou_threshold... class Sort (line 209) | class Sort(object): method __init__ (line 210) | def __init__(self, max_age=1, min_hits=3, iou_threshold=0.3): method getTrackers (line 219) | def getTrackers(self,): method update (line 222) | def update(self, dets= np.empty((0,6))): function parse_args (line 272) | def parse_args(): FILE: yolo/v8/detect/train.py class DetectionTrainer (line 23) | class DetectionTrainer(BaseTrainer): method get_dataloader (line 25) | def get_dataloader(self, dataset_path, batch_size, mode="train", rank=0): method preprocess_batch (line 46) | def preprocess_batch(self, batch): method set_model_attributes (line 50) | def set_model_attributes(self): method get_model (line 60) | def get_model(self, cfg=None, weights=None, verbose=True): method get_validator (line 67) | def get_validator(self): method criterion (line 74) | def criterion(self, preds, batch): method label_loss_items (line 79) | def label_loss_items(self, loss_items=None, prefix="train"): method progress_string (line 91) | def progress_string(self): method plot_training_samples (line 95) | def plot_training_samples(self, batch, ni): method plot_metrics (line 103) | def plot_metrics(self): class Loss (line 108) | class Loss: method __init__ (line 110) | def __init__(self, model): # model must be de-paralleled method preprocess (line 129) | def preprocess(self, targets, batch_size, scale_tensor): method bbox_decode (line 144) | def bbox_decode(self, anchor_points, pred_dist): method __call__ (line 152) | def __call__(self, preds, batch): function train (line 199) | def train(cfg): FILE: yolo/v8/detect/val.py class DetectionValidator (line 20) | class DetectionValidator(BaseValidator): method __init__ (line 22) | def __init__(self, dataloader=None, save_dir=None, pbar=None, logger=N... method preprocess (line 31) | def preprocess(self, batch): method init_metrics (line 44) | def init_metrics(self, model): method get_desc (line 57) | def get_desc(self): method postprocess (line 60) | def postprocess(self, preds): method update_metrics (line 70) | def update_metrics(self, preds, batch): method get_stats (line 113) | def get_stats(self): method print_results (line 120) | def print_results(self): method _process_batch (line 135) | def _process_batch(self, detections, labels): method get_dataloader (line 160) | def get_dataloader(self, dataset_path, batch_size): method plot_val_samples (line 178) | def plot_val_samples(self, batch, ni): method plot_predictions (line 187) | def plot_predictions(self, batch, preds, ni): method pred_to_json (line 194) | def pred_to_json(self, predn, filename): method eval_json (line 206) | def eval_json(self, stats): function val (line 233) | def val(cfg):