SYMBOL INDEX (474 symbols across 28 files) FILE: detect.py function run (line 39) | def run(weights=ROOT / 'yolov5s.pt', # model.pt path(s) function parse_opt (line 203) | def parse_opt(): function main (line 236) | def main(opt): FILE: export.py function export_torchscript (line 75) | def export_torchscript(model, im, file, optimize, prefix=colorstr('Torch... function export_onnx (line 91) | def export_onnx(model, im, file, opset, train, dynamic, simplify, prefix... function export_coreml (line 135) | def export_coreml(model, im, file, prefix=colorstr('CoreML:')): function export_saved_model (line 157) | def export_saved_model(model, im, file, dynamic, function export_pb (line 189) | def export_pb(keras_model, im, file, prefix=colorstr('TensorFlow GraphDe... function export_tflite (line 209) | def export_tflite(keras_model, im, file, int8, data, ncalib, prefix=colo... function export_tfjs (line 242) | def export_tfjs(keras_model, im, file, prefix=colorstr('TensorFlow.js:')): function export_engine (line 278) | def export_engine(model, im, file, train, half, simplify, workspace=4, v... function run (line 325) | def run(data=ROOT / 'data/coco128.yaml', # 'dataset.yaml path' function parse_opt (line 467) | def parse_opt(): function main (line 499) | def main(opt): FILE: hubconf.py function _create (line 14) | def _create(name, pretrained=True, channels=3, classes=80, autoshape=Tru... function custom (line 68) | def custom(path='path/to/model.pt', autoshape=True, verbose=True, device... function yolov5n (line 73) | def yolov5n(pretrained=True, channels=3, classes=80, autoshape=True, ver... function yolov5s (line 78) | def yolov5s(pretrained=True, channels=3, classes=80, autoshape=True, ver... function yolov5m (line 83) | def yolov5m(pretrained=True, channels=3, classes=80, autoshape=True, ver... function yolov5l (line 88) | def yolov5l(pretrained=True, channels=3, classes=80, autoshape=True, ver... function yolov5x (line 93) | def yolov5x(pretrained=True, channels=3, classes=80, autoshape=True, ver... function yolov5n6 (line 98) | def yolov5n6(pretrained=True, channels=3, classes=80, autoshape=True, ve... function yolov5s6 (line 103) | def yolov5s6(pretrained=True, channels=3, classes=80, autoshape=True, ve... function yolov5m6 (line 108) | def yolov5m6(pretrained=True, channels=3, classes=80, autoshape=True, ve... function yolov5l6 (line 113) | def yolov5l6(pretrained=True, channels=3, classes=80, autoshape=True, ve... function yolov5x6 (line 118) | def yolov5x6(pretrained=True, channels=3, classes=80, autoshape=True, ve... FILE: models/common.py function autopad (line 30) | def autopad(k, p=None): # kernel, padding class Conv (line 37) | class Conv(nn.Module): method __init__ (line 39) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 45) | def forward(self, x): method forward_fuse (line 48) | def forward_fuse(self, x): class DWConv (line 52) | class DWConv(Conv): method __init__ (line 54) | def __init__(self, c1, c2, k=1, s=1, act=True): # ch_in, ch_out, kern... class TransformerLayer (line 58) | class TransformerLayer(nn.Module): method __init__ (line 60) | def __init__(self, c, num_heads): method forward (line 69) | def forward(self, x): class TransformerBlock (line 75) | class TransformerBlock(nn.Module): method __init__ (line 77) | def __init__(self, c1, c2, num_heads, num_layers): method forward (line 86) | def forward(self, x): class Bottleneck (line 94) | class Bottleneck(nn.Module): method __init__ (line 96) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): # ch_in, ch_ou... method forward (line 103) | def forward(self, x): class BottleneckCSP (line 107) | class BottleneckCSP(nn.Module): method __init__ (line 109) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 120) | def forward(self, x): class C3 (line 126) | class C3(nn.Module): method __init__ (line 128) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 137) | def forward(self, x): class C3TR (line 141) | class C3TR(C3): method __init__ (line 143) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3SPP (line 149) | class C3SPP(C3): method __init__ (line 151) | def __init__(self, c1, c2, k=(5, 9, 13), n=1, shortcut=True, g=1, e=0.5): class C3Ghost (line 157) | class C3Ghost(C3): method __init__ (line 159) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class SPP (line 165) | class SPP(nn.Module): method __init__ (line 167) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 174) | def forward(self, x): method __init__ (line 182) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 191) | def forward(self, x): class SPP (line 181) | class SPP(nn.Module): method __init__ (line 167) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 174) | def forward(self, x): method __init__ (line 182) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 191) | def forward(self, x): class SPPF (line 205) | class SPPF(nn.Module): method __init__ (line 207) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 214) | def forward(self, x): method __init__ (line 224) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 231) | def forward(self, x): class SPPF (line 222) | class SPPF(nn.Module): method __init__ (line 207) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 214) | def forward(self, x): method __init__ (line 224) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 231) | def forward(self, x): class Focus (line 251) | class Focus(nn.Module): method __init__ (line 253) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 258) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class GhostConv (line 263) | class GhostConv(nn.Module): method __init__ (line 265) | def __init__(self, c1, c2, k=1, s=1, g=1, act=True): # ch_in, ch_out,... method forward (line 271) | def forward(self, x): class GhostBottleneck (line 276) | class GhostBottleneck(nn.Module): method __init__ (line 278) | def __init__(self, c1, c2, k=3, s=1): # ch_in, ch_out, kernel, stride method forward (line 287) | def forward(self, x): class Contract (line 291) | class Contract(nn.Module): method __init__ (line 293) | def __init__(self, gain=2): method forward (line 297) | def forward(self, x): class Expand (line 305) | class Expand(nn.Module): method __init__ (line 307) | def __init__(self, gain=2): method forward (line 311) | def forward(self, x): class Concat (line 319) | class Concat(nn.Module): method __init__ (line 321) | def __init__(self, dimension=1): method forward (line 325) | def forward(self, x): class DetectMultiBackend (line 329) | class DetectMultiBackend(nn.Module): method __init__ (line 331) | def __init__(self, weights='yolov5s.pt', device=None, dnn=False): method forward (line 435) | def forward(self, im, augment=False, visualize=False, val=False): method warmup (line 489) | def warmup(self, imgsz=(1, 3, 640, 640), half=False): class AutoShape (line 497) | class AutoShape(nn.Module): method __init__ (line 507) | def __init__(self, model): method _apply (line 515) | def _apply(self, fn): method forward (line 527) | def forward(self, imgs, size=640, augment=False, profile=False): class Detections (line 585) | class Detections: method __init__ (line 587) | def __init__(self, imgs, pred, files, times=(0, 0, 0, 0), names=None, ... method display (line 604) | def display(self, pprint=False, show=False, save=False, crop=False, re... method print (line 643) | def print(self): method show (line 648) | def show(self): method save (line 651) | def save(self, save_dir='runs/detect/exp'): method crop (line 655) | def crop(self, save=True, save_dir='runs/detect/exp'): method render (line 659) | def render(self): method pandas (line 663) | def pandas(self): method tolist (line 673) | def tolist(self): method __len__ (line 682) | def __len__(self): class Classify (line 686) | class Classify(nn.Module): method __init__ (line 688) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1): # ch_in, ch_out, k... method forward (line 694) | def forward(self, x): FILE: models/common_rk_plug_in.py class surrogate_focus (line 8) | class surrogate_focus(nn.Module): method __init__ (line 10) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 39) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class preprocess_conv_layer (line 43) | class preprocess_conv_layer(nn.Module): method __init__ (line 68) | def __init__(self, input_module, mean_value, std_value, BGR2RGB=False): method forward (line 100) | def forward(self, x): FILE: models/experimental.py class CrossConv (line 15) | class CrossConv(nn.Module): method __init__ (line 17) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): method forward (line 25) | def forward(self, x): class Sum (line 29) | class Sum(nn.Module): method __init__ (line 31) | def __init__(self, n, weight=False): # n: number of inputs method forward (line 38) | def forward(self, x): class MixConv2d (line 50) | class MixConv2d(nn.Module): method __init__ (line 52) | def __init__(self, c1, c2, k=(1, 3), s=1, equal_ch=True): # ch_in, ch... method forward (line 71) | def forward(self, x): class Ensemble (line 75) | class Ensemble(nn.ModuleList): method __init__ (line 77) | def __init__(self): method forward (line 80) | def forward(self, x, augment=False, profile=False, visualize=False): function attempt_load (line 90) | def attempt_load(weights, map_location=None, inplace=True, fuse=True): FILE: models/tf.py class TFBN (line 37) | class TFBN(keras.layers.Layer): method __init__ (line 39) | def __init__(self, w=None): method call (line 48) | def call(self, inputs): class TFPad (line 52) | class TFPad(keras.layers.Layer): method __init__ (line 53) | def __init__(self, pad): method call (line 57) | def call(self, inputs): class TFConv (line 61) | class TFConv(keras.layers.Layer): method __init__ (line 63) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 88) | def call(self, inputs): class TFFocus (line 92) | class TFFocus(keras.layers.Layer): method __init__ (line 94) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 99) | def call(self, inputs): # x(b,w,h,c) -> y(b,w/2,h/2,4c) class TFBottleneck (line 107) | class TFBottleneck(keras.layers.Layer): method __init__ (line 109) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5, w=None): # ch_i... method call (line 116) | def call(self, inputs): class TFConv2d (line 120) | class TFConv2d(keras.layers.Layer): method __init__ (line 122) | def __init__(self, c1, c2, k, s=1, g=1, bias=True, w=None): method call (line 130) | def call(self, inputs): class TFBottleneckCSP (line 134) | class TFBottleneckCSP(keras.layers.Layer): method __init__ (line 136) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 148) | def call(self, inputs): class TFC3 (line 154) | class TFC3(keras.layers.Layer): method __init__ (line 156) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 165) | def call(self, inputs): class TFSPP (line 169) | class TFSPP(keras.layers.Layer): method __init__ (line 171) | def __init__(self, c1, c2, k=(5, 9, 13), w=None): method call (line 178) | def call(self, inputs): class TFSPPF (line 183) | class TFSPPF(keras.layers.Layer): method __init__ (line 185) | def __init__(self, c1, c2, k=5, w=None): method call (line 192) | def call(self, inputs): class TFDetect (line 199) | class TFDetect(keras.layers.Layer): method __init__ (line 200) | def __init__(self, nc=80, anchors=(), ch=(), imgsz=(640, 640), w=None)... method call (line 218) | def call(self, inputs): method _make_grid (line 240) | def _make_grid(nx=20, ny=20): class TFUpsample (line 247) | class TFUpsample(keras.layers.Layer): method __init__ (line 248) | def __init__(self, size, scale_factor, mode, w=None): # warning: all ... method call (line 257) | def call(self, inputs): class TFConcat (line 261) | class TFConcat(keras.layers.Layer): method __init__ (line 262) | def __init__(self, dimension=1, w=None): method call (line 267) | def call(self, inputs): function parse_model (line 271) | def parse_model(d, ch, model, imgsz): # model_dict, input_channels(3) class TFModel (line 323) | class TFModel: method __init__ (line 324) | def __init__(self, cfg='yolov5s.yaml', ch=3, nc=None, model=None, imgs... method predict (line 340) | def predict(self, inputs, tf_nms=False, agnostic_nms=False, topk_per_c... method _xywh2xyxy (line 374) | def _xywh2xyxy(xywh): class AgnosticNMS (line 380) | class AgnosticNMS(keras.layers.Layer): method call (line 382) | def call(self, input, topk_all, iou_thres, conf_thres): method _nms (line 389) | def _nms(x, topk_all=100, iou_thres=0.45, conf_thres=0.25): # agnosti... function representative_dataset_gen (line 411) | def representative_dataset_gen(dataset, ncalib=100): function run (line 422) | def run(weights=ROOT / 'yolov5s.pt', # weights path function parse_opt (line 446) | def parse_opt(): function main (line 458) | def main(opt): FILE: models/yolo.py class Detect (line 33) | class Detect(nn.Module): method __init__ (line 37) | def __init__(self, nc=80, anchors=(), ch=(), inplace=True): # detecti... method forward (line 49) | def forward(self, x): method _make_grid (line 79) | def _make_grid(self, nx=20, ny=20, i=0): class Model (line 91) | class Model(nn.Module): method __init__ (line 92) | def __init__(self, cfg='yolov5s.yaml', ch=3, nc=None, anchors=None): ... method forward (line 130) | def forward(self, x, augment=False, profile=False, visualize=False): method _forward_augment (line 135) | def _forward_augment(self, x): method _forward_once (line 149) | def _forward_once(self, x, profile=False, visualize=False): method _descale_pred (line 162) | def _descale_pred(self, p, flips, scale, img_size): method _clip_augmented (line 179) | def _clip_augmented(self, y): method _profile_one_layer (line 190) | def _profile_one_layer(self, m, x, dt): method _initialize_biases (line 203) | def _initialize_biases(self, cf=None): # initialize biases into Detec... method _print_biases (line 213) | def _print_biases(self): method fuse (line 225) | def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers method info (line 235) | def info(self, verbose=False, img_size=640): # print model information method _apply (line 238) | def _apply(self, fn): function parse_model (line 250) | def parse_model(d, ch): # model_dict, input_channels(3) FILE: train.py function train (line 58) | def train(hyp, # path/to/hyp.yaml or hyp dictionary function parse_opt (line 441) | def parse_opt(known=False): function main (line 486) | def main(opt, callbacks=Callbacks()): function run (line 616) | def run(**kwargs): FILE: utils/__init__.py function notebook_init (line 7) | def notebook_init(verbose=True): FILE: utils/activations.py class SiLU (line 12) | class SiLU(nn.Module): # export-friendly version of nn.SiLU() method forward (line 14) | def forward(x): class Hardswish (line 18) | class Hardswish(nn.Module): # export-friendly version of nn.Hardswish() method forward (line 20) | def forward(x): class Mish (line 26) | class Mish(nn.Module): method forward (line 28) | def forward(x): class MemoryEfficientMish (line 32) | class MemoryEfficientMish(nn.Module): class F (line 33) | class F(torch.autograd.Function): method forward (line 35) | def forward(ctx, x): method backward (line 40) | def backward(ctx, grad_output): method forward (line 46) | def forward(self, x): class FReLU (line 51) | class FReLU(nn.Module): method __init__ (line 52) | def __init__(self, c1, k=3): # ch_in, kernel method forward (line 57) | def forward(self, x): class AconC (line 62) | class AconC(nn.Module): method __init__ (line 68) | def __init__(self, c1): method forward (line 74) | def forward(self, x): class MetaAconC (line 79) | class MetaAconC(nn.Module): method __init__ (line 85) | def __init__(self, c1, k=1, s=1, r=16): # ch_in, kernel, stride, r method forward (line 95) | def forward(self, x): FILE: utils/augmentations.py class Albumentations (line 16) | class Albumentations: method __init__ (line 18) | def __init__(self): method __call__ (line 40) | def __call__(self, im, labels, p=1.0): function augment_hsv (line 47) | def augment_hsv(im, hgain=0.5, sgain=0.5, vgain=0.5): function hist_equalize (line 63) | def hist_equalize(im, clahe=True, bgr=False): function replicate (line 74) | def replicate(im, labels): function letterbox (line 91) | def letterbox(im, new_shape=(640, 640), color=(114, 114, 114), auto=True... function random_perspective (line 124) | def random_perspective(im, targets=(), segments=(), degrees=10, translat... function copy_paste (line 213) | def copy_paste(im, labels, segments, p=0.5): function cutout (line 237) | def cutout(im, labels, p=0.5): function mixup (line 264) | def mixup(im, labels, im2, labels2): function box_candidates (line 272) | def box_candidates(box1, box2, wh_thr=2, ar_thr=20, area_thr=0.1, eps=1e... FILE: utils/autoanchor.py function check_anchor_order (line 18) | def check_anchor_order(m): function check_anchors (line 28) | def check_anchors(dataset, model, thr=4.0, imgsz=640): function kmean_anchors (line 65) | def kmean_anchors(dataset='./data/coco128.yaml', n=9, img_size=640, thr=... FILE: utils/autobatch.py function check_train_batch_size (line 16) | def check_train_batch_size(model, imgsz=640): function autobatch (line 22) | def autobatch(model, imgsz=640, fraction=0.9, batch_size=16): FILE: utils/callbacks.py class Callbacks (line 7) | class Callbacks: method __init__ (line 12) | def __init__(self): method register_action (line 39) | def register_action(self, hook, name='', callback=None): method get_registered_actions (line 52) | def get_registered_actions(self, hook=None): method run (line 64) | def run(self, hook, *args, **kwargs): FILE: utils/datasets.py function get_hash (line 45) | def get_hash(paths): function exif_size (line 53) | def exif_size(img): function exif_transpose (line 68) | def exif_transpose(image): function create_dataloader (line 94) | def create_dataloader(path, imgsz, batch_size, stride, single_cls=False,... class InfiniteDataLoader (line 124) | class InfiniteDataLoader(dataloader.DataLoader): method __init__ (line 130) | def __init__(self, *args, **kwargs): method __len__ (line 135) | def __len__(self): method __iter__ (line 138) | def __iter__(self): class _RepeatSampler (line 143) | class _RepeatSampler: method __init__ (line 150) | def __init__(self, sampler): method __iter__ (line 153) | def __iter__(self): class LoadImages (line 158) | class LoadImages: method __init__ (line 160) | def __init__(self, path, img_size=640, stride=32, auto=True): method __iter__ (line 189) | def __iter__(self): method __next__ (line 193) | def __next__(self): method new_video (line 231) | def new_video(self, path): method __len__ (line 236) | def __len__(self): class LoadWebcam (line 240) | class LoadWebcam: # for inference method __init__ (line 242) | def __init__(self, pipe='0', img_size=640, stride=32): method __iter__ (line 249) | def __iter__(self): method __next__ (line 253) | def __next__(self): method __len__ (line 278) | def __len__(self): class LoadStreams (line 282) | class LoadStreams: method __init__ (line 284) | def __init__(self, sources='streams.txt', img_size=640, stride=32, aut... method update (line 326) | def update(self, i, cap, stream): method __iter__ (line 343) | def __iter__(self): method __next__ (line 347) | def __next__(self): method __len__ (line 366) | def __len__(self): function img2label_paths (line 370) | def img2label_paths(img_paths): class LoadImagesAndLabels (line 376) | class LoadImagesAndLabels(Dataset): method __init__ (line 380) | def __init__(self, path, img_size=640, batch_size=16, augment=False, h... method cache_labels (line 507) | def cache_labels(self, path=Path('./labels.cache'), prefix=''): method __len__ (line 543) | def __len__(self): method __getitem__ (line 552) | def __getitem__(self, index): method collate_fn (line 626) | def collate_fn(batch): method collate_fn4 (line 633) | def collate_fn4(batch): function load_image (line 660) | def load_image(self, i): function load_mosaic (line 681) | def load_mosaic(self, index): function load_mosaic9 (line 738) | def load_mosaic9(self, index): function create_folder (line 812) | def create_folder(path='./new'): function flatten_recursive (line 819) | def flatten_recursive(path='../datasets/coco128'): function extract_boxes (line 827) | def extract_boxes(path='../datasets/coco128'): # from utils.datasets im... function autosplit (line 861) | def autosplit(path='../datasets/coco128/images', weights=(0.9, 0.1, 0.0)... function verify_image_label (line 885) | def verify_image_label(args): function dataset_stats (line 937) | def dataset_stats(path='coco128.yaml', autodownload=False, verbose=False... FILE: utils/downloads.py function gsutil_getsize (line 18) | def gsutil_getsize(url=''): function safe_download (line 24) | def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''): function attempt_download (line 43) | def attempt_download(file, repo='ultralytics/yolov5'): # from utils.dow... function gdrive_download (line 80) | def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zi... function get_token (line 115) | def get_token(cookie="./cookie"): FILE: utils/flask_rest_api/restapi.py function predict (line 17) | def predict(): FILE: utils/general.py function set_logging (line 47) | def set_logging(name=None, verbose=True): class Profile (line 57) | class Profile(contextlib.ContextDecorator): method __enter__ (line 59) | def __enter__(self): method __exit__ (line 62) | def __exit__(self, type, value, traceback): class Timeout (line 66) | class Timeout(contextlib.ContextDecorator): method __init__ (line 68) | def __init__(self, seconds, *, timeout_msg='', suppress_timeout_errors... method _timeout_handler (line 73) | def _timeout_handler(self, signum, frame): method __enter__ (line 76) | def __enter__(self): method __exit__ (line 80) | def __exit__(self, exc_type, exc_val, exc_tb): class WorkingDirectory (line 86) | class WorkingDirectory(contextlib.ContextDecorator): method __init__ (line 88) | def __init__(self, new_dir): method __enter__ (line 92) | def __enter__(self): method __exit__ (line 95) | def __exit__(self, exc_type, exc_val, exc_tb): function try_except (line 99) | def try_except(func): function methods (line 110) | def methods(instance): function print_args (line 115) | def print_args(name, opt): function init_seeds (line 120) | def init_seeds(seed=0): function intersect_dicts (line 130) | def intersect_dicts(da, db, exclude=()): function get_latest_run (line 135) | def get_latest_run(search_dir='.'): function user_config_dir (line 141) | def user_config_dir(dir='Ultralytics', env_var='YOLOV5_CONFIG_DIR'): function is_writeable (line 154) | def is_writeable(dir, test=False): function is_docker (line 169) | def is_docker(): function is_colab (line 174) | def is_colab(): function is_pip (line 183) | def is_pip(): function is_ascii (line 188) | def is_ascii(s=''): function is_chinese (line 194) | def is_chinese(s='人工智能'): function emojis (line 199) | def emojis(str=''): function file_size (line 204) | def file_size(path): function check_online (line 215) | def check_online(): function check_git_status (line 227) | def check_git_status(): function check_python (line 246) | def check_python(minimum='3.6.2'): function check_version (line 251) | def check_version(current='0.0.0', minimum='0.0.0', name='version ', pin... function check_requirements (line 262) | def check_requirements(requirements=ROOT / 'requirements.txt', exclude=(... function check_img_size (line 298) | def check_img_size(imgsz, s=32, floor=0): function check_imshow (line 309) | def check_imshow(): function check_suffix (line 324) | def check_suffix(file='yolov5s.pt', suffix=('.pt',), msg=''): function check_yaml (line 335) | def check_yaml(file, suffix=('.yaml', '.yml')): function check_file (line 340) | def check_file(file, suffix=''): function check_dataset (line 365) | def check_dataset(data, autodownload=True): function url2file (line 417) | def url2file(url): function download (line 424) | def download(url, dir='.', unzip=True, delete=True, curl=False, threads=1): function make_divisible (line 458) | def make_divisible(x, divisor): function clean_str (line 465) | def clean_str(s): function one_cycle (line 470) | def one_cycle(y1=0.0, y2=1.0, steps=100): function colorstr (line 475) | def colorstr(*input): function labels_to_class_weights (line 500) | def labels_to_class_weights(labels, nc=80): function labels_to_image_weights (line 519) | def labels_to_image_weights(labels, nc=80, class_weights=np.ones(80)): function coco80_to_coco91_class (line 527) | def coco80_to_coco91_class(): # converts 80-index (val2014) to 91-index... function xyxy2xywh (line 539) | def xyxy2xywh(x): function xywh2xyxy (line 549) | def xywh2xyxy(x): function xywhn2xyxy (line 559) | def xywhn2xyxy(x, w=640, h=640, padw=0, padh=0): function xyxy2xywhn (line 569) | def xyxy2xywhn(x, w=640, h=640, clip=False, eps=0.0): function xyn2xy (line 581) | def xyn2xy(x, w=640, h=640, padw=0, padh=0): function segment2box (line 589) | def segment2box(segment, width=640, height=640): function segments2boxes (line 597) | def segments2boxes(segments): function resample_segments (line 606) | def resample_segments(segments, n=1000): function scale_coords (line 615) | def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None): function clip_coords (line 631) | def clip_coords(boxes, shape): function non_max_suppression (line 643) | def non_max_suppression(prediction, conf_thres=0.25, iou_thres=0.45, cla... function strip_optimizer (line 737) | def strip_optimizer(f='best.pt', s=''): # from utils.general import *; ... function print_mutation (line 753) | def print_mutation(results, hyp, save_dir, bucket): function apply_classifier (line 792) | def apply_classifier(x, model, img, im0): function increment_path (line 828) | def increment_path(path, exist_ok=False, sep='', mkdir=False): FILE: utils/loggers/__init__.py class Loggers (line 37) | class Loggers(): method __init__ (line 39) | def __init__(self, save_dir=None, weights=None, opt=None, hyp=None, lo... method on_pretrain_routine_end (line 76) | def on_pretrain_routine_end(self): method on_train_batch_end (line 82) | def on_train_batch_end(self, ni, model, imgs, targets, paths, plots, s... method on_train_epoch_end (line 97) | def on_train_epoch_end(self, epoch): method on_val_image_end (line 102) | def on_val_image_end(self, pred, predn, path, names, im): method on_val_end (line 107) | def on_val_end(self): method on_fit_epoch_end (line 113) | def on_fit_epoch_end(self, vals, epoch, best_fitness, fi): method on_model_save (line 131) | def on_model_save(self, last, epoch, final_epoch, best_fitness, fi): method on_train_end (line 137) | def on_train_end(self, last, best, plots, epoch, results): FILE: utils/loggers/wandb/log_dataset.py function create_dataset_artifact (line 10) | def create_dataset_artifact(opt): FILE: utils/loggers/wandb/sweep.py function sweep (line 17) | def sweep(): FILE: utils/loggers/wandb/wandb_utils.py function remove_prefix (line 32) | def remove_prefix(from_string, prefix=WANDB_ARTIFACT_PREFIX): function check_wandb_config_file (line 36) | def check_wandb_config_file(data_config_file): function check_wandb_dataset (line 43) | def check_wandb_dataset(data_file): function get_run_info (line 59) | def get_run_info(run_path): function check_wandb_resume (line 68) | def check_wandb_resume(opt): function process_wandb_config_ddp_mode (line 82) | def process_wandb_config_ddp_mode(opt): class WandbLogger (line 106) | class WandbLogger(): method __init__ (line 120) | def __init__(self, opt, run_id=None, job_type='Training'): method check_and_upload_dataset (line 192) | def check_and_upload_dataset(self, opt): method setup_training (line 210) | def setup_training(self, opt): method download_dataset_artifact (line 260) | def download_dataset_artifact(self, path, alias): method download_model_artifact (line 280) | def download_model_artifact(self, opt): method log_model (line 298) | def log_model(self, path, opt, epoch, fitness_score, best_model=False): method log_dataset_artifact (line 322) | def log_dataset_artifact(self, data_file, single_cls, project, overwri... method map_val_table_path (line 379) | def map_val_table_path(self): method create_dataset_table (line 389) | def create_dataset_table(self, dataset: LoadImagesAndLabels, class_to_... method log_training_progress (line 431) | def log_training_progress(self, predn, path, names): method val_one_image (line 472) | def val_one_image(self, pred, predn, path, names, im): method log (line 494) | def log(self, log_dict): method end_epoch (line 505) | def end_epoch(self, best_result=False): method finish_run (line 537) | def finish_run(self): function all_logging_disabled (line 549) | def all_logging_disabled(highest_level=logging.CRITICAL): FILE: utils/loss.py function smooth_BCE (line 13) | def smooth_BCE(eps=0.1): # https://github.com/ultralytics/yolov3/issues... class BCEBlurWithLogitsLoss (line 18) | class BCEBlurWithLogitsLoss(nn.Module): method __init__ (line 20) | def __init__(self, alpha=0.05): method forward (line 25) | def forward(self, pred, true): class FocalLoss (line 35) | class FocalLoss(nn.Module): method __init__ (line 37) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 45) | def forward(self, pred, true): class QFocalLoss (line 65) | class QFocalLoss(nn.Module): method __init__ (line 67) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 75) | def forward(self, pred, true): class ComputeLoss (line 91) | class ComputeLoss: method __init__ (line 93) | def __init__(self, model, autobalance=False): method __call__ (line 117) | def __call__(self, p, targets): # predictions, targets, model method build_targets (line 169) | def build_targets(self, p, targets): FILE: utils/metrics.py function fitness (line 15) | def fitness(x): function ap_per_class (line 21) | def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir='.... function compute_ap (line 89) | def compute_ap(recall, precision): class ConfusionMatrix (line 117) | class ConfusionMatrix: method __init__ (line 119) | def __init__(self, nc, conf=0.25, iou_thres=0.45): method process_batch (line 125) | def process_batch(self, detections, labels): method matrix (line 165) | def matrix(self): method tp_fp (line 168) | def tp_fp(self): method plot (line 174) | def plot(self, normalize=True, save_dir='', names=()): method print (line 196) | def print(self): function bbox_iou (line 201) | def bbox_iou(box1, box2, x1y1x2y2=True, GIoU=False, DIoU=False, CIoU=Fal... function box_iou (line 246) | def box_iou(box1, box2): function bbox_ioa (line 271) | def bbox_ioa(box1, box2, eps=1E-7): function wh_iou (line 295) | def wh_iou(wh1, wh2): function plot_pr_curve (line 305) | def plot_pr_curve(px, py, ap, save_dir='pr_curve.png', names=()): function plot_mc_curve (line 326) | def plot_mc_curve(px, py, save_dir='mc_curve.png', names=(), xlabel='Con... FILE: utils/plots.py class Colors (line 31) | class Colors: method __init__ (line 33) | def __init__(self): method __call__ (line 40) | def __call__(self, i, bgr=False): method hex2rgb (line 45) | def hex2rgb(h): # rgb order (PIL) function check_font (line 52) | def check_font(font='Arial.ttf', size=10): class Annotator (line 68) | class Annotator: method __init__ (line 73) | def __init__(self, im, line_width=None, font_size=None, font='Arial.tt... method box_label (line 85) | def box_label(self, box, label='', color=(128, 128, 128), txt_color=(2... method rectangle (line 110) | def rectangle(self, xy, fill=None, outline=None, width=1): method text (line 114) | def text(self, xy, text, txt_color=(255, 255, 255)): method result (line 119) | def result(self): function feature_visualization (line 124) | def feature_visualization(x, module_type, stage, n=32, save_dir=Path('ru... function hist2d (line 152) | def hist2d(x, y, n=100): function butter_lowpass_filtfilt (line 161) | def butter_lowpass_filtfilt(data, cutoff=1500, fs=50000, order=5): function output_to_target (line 174) | def output_to_target(output): function plot_images (line 183) | def plot_images(images, targets, paths=None, fname='images.jpg', names=N... function plot_lr_scheduler (line 244) | def plot_lr_scheduler(optimizer, scheduler, epochs=300, save_dir=''): function plot_val_txt (line 261) | def plot_val_txt(): # from utils.plots import *; plot_val() function plot_targets_txt (line 278) | def plot_targets_txt(): # from utils.plots import *; plot_targets_txt() function plot_val_study (line 291) | def plot_val_study(file='', dir='', x=None): # from utils.plots import ... function plot_labels (line 330) | def plot_labels(labels, names=(), save_dir=Path('')): function plot_evolve (line 374) | def plot_evolve(evolve_csv='path/to/evolve.csv'): # from utils.plots im... function plot_results (line 400) | def plot_results(file='path/to/results.csv', dir=''): function profile_idetection (line 426) | def profile_idetection(start=0, stop=0, labels=(), save_dir=''): function save_one_box (line 457) | def save_one_box(xyxy, im, file='image.jpg', gain=1.02, pad=10, square=F... FILE: utils/torch_utils.py function torch_distributed_zero_first (line 30) | def torch_distributed_zero_first(local_rank: int): function date_modified (line 41) | def date_modified(path=__file__): function git_describe (line 47) | def git_describe(path=Path(__file__).parent): # path must be a directory function select_device (line 56) | def select_device(device='', batch_size=0, newline=True): function time_sync (line 86) | def time_sync(): function profile (line 93) | def profile(input, ops, n=10, device=None): function is_parallel (line 145) | def is_parallel(model): function de_parallel (line 150) | def de_parallel(model): function initialize_weights (line 155) | def initialize_weights(model): function find_modules (line 167) | def find_modules(model, mclass=nn.Conv2d): function sparsity (line 172) | def sparsity(model): function prune (line 181) | def prune(model, amount=0.3): function fuse_conv_and_bn (line 192) | def fuse_conv_and_bn(conv, bn): function model_info (line 215) | def model_info(model, verbose=False, img_size=640): function scale_img (line 239) | def scale_img(img, ratio=1.0, same_shape=False, gs=32): # img(16,3,256,... function copy_attr (line 252) | def copy_attr(a, b, include=(), exclude=()): class EarlyStopping (line 261) | class EarlyStopping: method __init__ (line 263) | def __init__(self, patience=30): method __call__ (line 269) | def __call__(self, epoch, fitness): class ModelEMA (line 284) | class ModelEMA: method __init__ (line 294) | def __init__(self, model, decay=0.9999, updates=0): method update (line 304) | def update(self, model): method update_attr (line 316) | def update_attr(self, model, include=(), exclude=('process_group', 're... FILE: val.py function save_one_txt (line 37) | def save_one_txt(predn, save_conf, shape, file): function save_one_json (line 47) | def save_one_json(predn, jdict, path, class_map): function process_batch (line 59) | def process_batch(detections, labels, iouv): function run (line 84) | def run(data, function parse_opt (line 306) | def parse_opt(): function main (line 337) | def main(opt):