SYMBOL INDEX (691 symbols across 43 files) FILE: benchmarks.py function run (line 52) | def run( function test (line 150) | def test( function parse_opt (line 219) | def parse_opt(): function main (line 257) | def main(opt): FILE: classify/predict.py function run (line 68) | def run( function parse_opt (line 207) | def parse_opt(): function main (line 233) | def main(opt): FILE: classify/train.py function train (line 78) | def train(opt, device): function parse_opt (line 313) | def parse_opt(known=False): function main (line 343) | def main(opt): function run (line 367) | def run(**kwargs): FILE: classify/val.py function run (line 53) | def run( function parse_opt (line 150) | def parse_opt(): function main (line 170) | def main(opt): FILE: detect.py function run (line 70) | def run( function parse_opt (line 323) | def parse_opt(): function main (line 408) | def main(opt): FILE: export.py class iOSModel (line 93) | class iOSModel(torch.nn.Module): method __init__ (line 96) | def __init__(self, model, im): method forward (line 122) | def forward(self, x): function export_formats (line 143) | def export_formats(): function try_export (line 182) | def try_export(inner_func): function export_torchscript (line 225) | def export_torchscript(model, im, file, optimize, prefix=colorstr("Torch... function export_onnx (line 280) | def export_onnx(model, im, file, opset, dynamic, simplify, prefix=colors... function export_openvino (line 379) | def export_openvino(file, metadata, half, int8, data, prefix=colorstr("O... function export_paddle (line 467) | def export_paddle(model, im, file, metadata, prefix=colorstr("PaddlePadd... function export_coreml (line 515) | def export_coreml(model, im, file, int8, half, nms, mlmodel, prefix=colo... function export_engine (line 584) | def export_engine( function export_saved_model (line 693) | def export_saved_model( function export_pb (line 789) | def export_pb(keras_model, file, prefix=colorstr("TensorFlow GraphDef:")): function export_tflite (line 826) | def export_tflite( function export_edgetpu (line 901) | def export_edgetpu(file, prefix=colorstr("Edge TPU:")): function export_tfjs (line 962) | def export_tfjs(file, int8, prefix=colorstr("TensorFlow.js:")): function add_tflite_metadata (line 1023) | def add_tflite_metadata(file, metadata, num_outputs): function pipeline_coreml (line 1084) | def pipeline_coreml(model, im, file, names, y, mlmodel, prefix=colorstr(... function run (line 1258) | def run( function parse_opt (line 1464) | def parse_opt(known=False): function main (line 1517) | def main(opt): FILE: hubconf.py function _create (line 16) | def _create(name, pretrained=True, channels=3, classes=80, autoshape=Tru... function custom (line 107) | def custom(path="path/to/model.pt", autoshape=True, _verbose=True, devic... function yolov5n (line 138) | def yolov5n(pretrained=True, channels=3, classes=80, autoshape=True, _ve... function yolov5s (line 175) | def yolov5s(pretrained=True, channels=3, classes=80, autoshape=True, _ve... function yolov5m (line 216) | def yolov5m(pretrained=True, channels=3, classes=80, autoshape=True, _ve... function yolov5l (line 249) | def yolov5l(pretrained=True, channels=3, classes=80, autoshape=True, _ve... function yolov5x (line 279) | def yolov5x(pretrained=True, channels=3, classes=80, autoshape=True, _ve... function yolov5n6 (line 309) | def yolov5n6(pretrained=True, channels=3, classes=80, autoshape=True, _v... function yolov5s6 (line 336) | def yolov5s6(pretrained=True, channels=3, classes=80, autoshape=True, _v... function yolov5m6 (line 373) | def yolov5m6(pretrained=True, channels=3, classes=80, autoshape=True, _v... function yolov5l6 (line 407) | def yolov5l6(pretrained=True, channels=3, classes=80, autoshape=True, _v... function yolov5x6 (line 439) | def yolov5x6(pretrained=True, channels=3, classes=80, autoshape=True, _v... FILE: models/common.py function autopad (line 60) | def autopad(k, p=None, d=1): class Conv (line 72) | class Conv(nn.Module): method __init__ (line 77) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, d=1, act=True): method forward (line 84) | def forward(self, x): method forward_fuse (line 88) | def forward_fuse(self, x): class DWConv (line 93) | class DWConv(Conv): method __init__ (line 96) | def __init__(self, c1, c2, k=1, s=1, d=1, act=True): class DWConvTranspose2d (line 103) | class DWConvTranspose2d(nn.ConvTranspose2d): method __init__ (line 106) | def __init__(self, c1, c2, k=1, s=1, p1=0, p2=0): class TransformerLayer (line 113) | class TransformerLayer(nn.Module): method __init__ (line 116) | def __init__(self, c, num_heads): method forward (line 129) | def forward(self, x): class TransformerBlock (line 136) | class TransformerBlock(nn.Module): method __init__ (line 139) | def __init__(self, c1, c2, num_heads, num_layers): method forward (line 151) | def forward(self, x): class Bottleneck (line 162) | class Bottleneck(nn.Module): method __init__ (line 165) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): method forward (line 175) | def forward(self, x): class BottleneckCSP (line 182) | class BottleneckCSP(nn.Module): method __init__ (line 185) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): method forward (line 199) | def forward(self, x): class CrossConv (line 208) | class CrossConv(nn.Module): method __init__ (line 211) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): method forward (line 223) | def forward(self, x): class C3 (line 228) | class C3(nn.Module): method __init__ (line 231) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): method forward (line 242) | def forward(self, x): class C3x (line 247) | class C3x(C3): method __init__ (line 250) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3TR (line 259) | class C3TR(C3): method __init__ (line 262) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3SPP (line 271) | class C3SPP(C3): method __init__ (line 274) | def __init__(self, c1, c2, k=(5, 9, 13), n=1, shortcut=True, g=1, e=0.5): class C3Ghost (line 283) | class C3Ghost(C3): method __init__ (line 286) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class SPP (line 293) | class SPP(nn.Module): method __init__ (line 296) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 306) | def forward(self, x): class SPPF (line 316) | class SPPF(nn.Module): method __init__ (line 319) | def __init__(self, c1, c2, k=5): method forward (line 331) | def forward(self, x): class Focus (line 341) | class Focus(nn.Module): method __init__ (line 344) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): method forward (line 352) | def forward(self, x): class GhostConv (line 358) | class GhostConv(nn.Module): method __init__ (line 361) | def __init__(self, c1, c2, k=1, s=1, g=1, act=True): method forward (line 370) | def forward(self, x): class GhostBottleneck (line 376) | class GhostBottleneck(nn.Module): method __init__ (line 379) | def __init__(self, c1, c2, k=3, s=1): method forward (line 394) | def forward(self, x): class Contract (line 399) | class Contract(nn.Module): method __init__ (line 402) | def __init__(self, gain=2): method forward (line 409) | def forward(self, x): class Expand (line 420) | class Expand(nn.Module): method __init__ (line 423) | def __init__(self, gain=2): method forward (line 432) | def forward(self, x): class Concat (line 441) | class Concat(nn.Module): method __init__ (line 444) | def __init__(self, dimension=1): method forward (line 449) | def forward(self, x): class DetectMultiBackend (line 454) | class DetectMultiBackend(nn.Module): method __init__ (line 457) | def __init__(self, weights="yolov5s.pt", device=torch.device("cpu"), d... method forward (line 687) | def forward(self, im, augment=False, visualize=False): method from_numpy (line 771) | def from_numpy(self, x): method warmup (line 775) | def warmup(self, imgsz=(1, 3, 640, 640)): method _model_type (line 784) | def _model_type(p="path/to/model.pt"): method _load_metadata (line 803) | def _load_metadata(f=Path("path/to/meta.yaml")): class AutoShape (line 811) | class AutoShape(nn.Module): method __init__ (line 822) | def __init__(self, model, verbose=True): method _apply (line 836) | def _apply(self, fn): method forward (line 851) | def forward(self, ims, size=640, augment=False, profile=False): class Detections (line 921) | class Detections: method __init__ (line 924) | def __init__(self, ims, pred, files, times=(0, 0, 0), names=None, shap... method _run (line 942) | def _run(self, pprint=False, show=False, save=False, crop=False, rende... method show (line 997) | def show(self, labels=True): method save (line 1004) | def save(self, labels=True, save_dir="runs/detect/exp", exist_ok=False): method crop (line 1012) | def crop(self, save=True, save_dir="runs/detect/exp", exist_ok=False): method render (line 1020) | def render(self, labels=True): method pandas (line 1025) | def pandas(self): method tolist (line 1038) | def tolist(self): method print (line 1056) | def print(self): method __len__ (line 1060) | def __len__(self): method __str__ (line 1064) | def __str__(self): method __repr__ (line 1070) | def __repr__(self): class Proto (line 1075) | class Proto(nn.Module): method __init__ (line 1078) | def __init__(self, c1, c_=256, c2=32): method forward (line 1086) | def forward(self, x): class Classify (line 1091) | class Classify(nn.Module): method __init__ (line 1094) | def __init__( method forward (line 1107) | def forward(self, x): FILE: models/experimental.py class Sum (line 14) | class Sum(nn.Module): method __init__ (line 17) | def __init__(self, n, weight=False): method forward (line 27) | def forward(self, x): class MixConv2d (line 40) | class MixConv2d(nn.Module): method __init__ (line 43) | def __init__(self, c1, c2, k=(1, 3), s=1, equal_ch=True): method forward (line 66) | def forward(self, x): class Ensemble (line 73) | class Ensemble(nn.ModuleList): method __init__ (line 76) | def __init__(self): method forward (line 80) | def forward(self, x, augment=False, profile=False, visualize=False): function attempt_load (line 89) | def attempt_load(weights, device=None, inplace=True, fuse=True): FILE: models/tf.py class TFBN (line 51) | class TFBN(keras.layers.Layer): method __init__ (line 54) | def __init__(self, w=None): method call (line 65) | def call(self, inputs): class TFPad (line 70) | class TFPad(keras.layers.Layer): method __init__ (line 73) | def __init__(self, pad): method call (line 85) | def call(self, inputs): class TFConv (line 90) | class TFConv(keras.layers.Layer): method __init__ (line 93) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 116) | def call(self, inputs): class TFDWConv (line 121) | class TFDWConv(keras.layers.Layer): method __init__ (line 124) | def __init__(self, c1, c2, k=1, s=1, p=None, act=True, w=None): method call (line 145) | def call(self, inputs): class TFDWConvTranspose2d (line 150) | class TFDWConvTranspose2d(keras.layers.Layer): method __init__ (line 153) | def __init__(self, c1, c2, k=1, s=1, p1=0, p2=0, w=None): method call (line 177) | def call(self, inputs): class TFFocus (line 182) | class TFFocus(keras.layers.Layer): method __init__ (line 185) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 194) | def call(self, inputs): class TFBottleneck (line 203) | class TFBottleneck(keras.layers.Layer): method __init__ (line 206) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5, w=None): method call (line 218) | def call(self, inputs): class TFCrossConv (line 225) | class TFCrossConv(keras.layers.Layer): method __init__ (line 228) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False, w=None): method call (line 236) | def call(self, inputs): class TFConv2d (line 241) | class TFConv2d(keras.layers.Layer): method __init__ (line 244) | def __init__(self, c1, c2, k, s=1, g=1, bias=True, w=None): method call (line 260) | def call(self, inputs): class TFBottleneckCSP (line 265) | class TFBottleneckCSP(keras.layers.Layer): method __init__ (line 268) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 284) | def call(self, inputs): class TFC3 (line 293) | class TFC3(keras.layers.Layer): method __init__ (line 296) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 308) | def call(self, inputs): class TFC3x (line 316) | class TFC3x(keras.layers.Layer): method __init__ (line 319) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 333) | def call(self, inputs): class TFSPP (line 338) | class TFSPP(keras.layers.Layer): method __init__ (line 341) | def __init__(self, c1, c2, k=(5, 9, 13), w=None): method call (line 349) | def call(self, inputs): class TFSPPF (line 355) | class TFSPPF(keras.layers.Layer): method __init__ (line 358) | def __init__(self, c1, c2, k=5, w=None): method call (line 366) | def call(self, inputs): class TFDetect (line 376) | class TFDetect(keras.layers.Layer): method __init__ (line 379) | def __init__(self, nc=80, anchors=(), ch=(), imgsz=(640, 640), w=None): method call (line 399) | def call(self, inputs): method _make_grid (line 424) | def _make_grid(nx=20, ny=20): class TFSegment (line 431) | class TFSegment(TFDetect): method __init__ (line 434) | def __init__(self, nc=80, anchors=(), nm=32, npr=256, ch=(), imgsz=(64... method call (line 446) | def call(self, x): class TFProto (line 455) | class TFProto(keras.layers.Layer): method __init__ (line 458) | def __init__(self, c1, c_=256, c2=32, w=None): method call (line 466) | def call(self, inputs): class TFUpsample (line 471) | class TFUpsample(keras.layers.Layer): method __init__ (line 474) | def __init__(self, size, scale_factor, mode, w=None): method call (line 488) | def call(self, inputs): class TFConcat (line 493) | class TFConcat(keras.layers.Layer): method __init__ (line 496) | def __init__(self, dimension=1, w=None): method call (line 502) | def call(self, inputs): function parse_model (line 507) | def parse_model(d, ch, model, imgsz): class TFModel (line 587) | class TFModel: method __init__ (line 590) | def __init__(self, cfg="yolov5s.yaml", ch=3, nc=None, model=None, imgs... method predict (line 608) | def predict( method _xywh2xyxy (line 650) | def _xywh2xyxy(xywh): class AgnosticNMS (line 656) | class AgnosticNMS(keras.layers.Layer): method call (line 659) | def call(self, input, topk_all, iou_thres, conf_thres): method _nms (line 669) | def _nms(x, topk_all=100, iou_thres=0.45, conf_thres=0.25): function activations (line 704) | def activations(act=nn.SiLU): function representative_dataset_gen (line 716) | def representative_dataset_gen(dataset, ncalib=100): function run (line 727) | def run( function parse_opt (line 753) | def parse_opt(): function main (line 768) | def main(opt): FILE: models/yolo.py class Detect (line 72) | class Detect(nn.Module): method __init__ (line 79) | def __init__(self, nc=80, anchors=(), ch=(), inplace=True): method forward (line 92) | def forward(self, x): method _make_grid (line 118) | def _make_grid(self, nx=20, ny=20, i=0, torch_1_10=check_version(torch... class Segment (line 130) | class Segment(Detect): method __init__ (line 133) | def __init__(self, nc=80, anchors=(), nm=32, npr=256, ch=(), inplace=T... method forward (line 143) | def forward(self, x): class BaseModel (line 152) | class BaseModel(nn.Module): method forward (line 155) | def forward(self, x, profile=False, visualize=False): method _forward_once (line 161) | def _forward_once(self, x, profile=False, visualize=False): method _profile_one_layer (line 175) | def _profile_one_layer(self, m, x, dt): method fuse (line 189) | def fuse(self): method info (line 200) | def info(self, verbose=False, img_size=640): method _apply (line 204) | def _apply(self, fn): class DetectionModel (line 218) | class DetectionModel(BaseModel): method __init__ (line 221) | def __init__(self, cfg="yolov5s.yaml", ch=3, nc=None, anchors=None): method forward (line 266) | def forward(self, x, augment=False, profile=False, visualize=False): method _forward_augment (line 272) | def _forward_augment(self, x): method _descale_pred (line 287) | def _descale_pred(self, p, flips, scale, img_size): method _clip_augmented (line 304) | def _clip_augmented(self, y): method _initialize_biases (line 317) | def _initialize_biases(self, cf=None): class SegmentationModel (line 336) | class SegmentationModel(DetectionModel): method __init__ (line 339) | def __init__(self, cfg="yolov5s-seg.yaml", ch=3, nc=None, anchors=None): class ClassificationModel (line 346) | class ClassificationModel(BaseModel): method __init__ (line 349) | def __init__(self, cfg=None, model=None, nc=1000, cutoff=10): method _from_detection_model (line 356) | def _from_detection_model(self, model, nc=1000, cutoff=10): method _from_yaml (line 373) | def _from_yaml(self, cfg): function parse_model (line 378) | def parse_model(d, ch): FILE: segment/predict.py function run (line 70) | def run( function parse_opt (line 260) | def parse_opt(): function main (line 299) | def main(opt): FILE: segment/train.py function train (line 100) | def train(hyp, opt, device, callbacks): function parse_opt (line 544) | def parse_opt(known=False): function main (line 592) | def main(opt, callbacks=Callbacks()): function run (line 749) | def run(**kwargs): FILE: segment/val.py function save_one_txt (line 73) | def save_one_txt(predn, save_conf, shape, file): function save_one_json (line 85) | def save_one_json(predn, jdict, path, class_map, pred_masks): function process_batch (line 116) | def process_batch(detections, labels, iouv, pred_masks=None, gt_masks=No... function run (line 155) | def run( function parse_opt (line 447) | def parse_opt(): function main (line 482) | def main(opt): FILE: train.py function train (line 105) | def train(hyp, opt, device, callbacks): function parse_opt (line 546) | def parse_opt(known=False): function main (line 620) | def main(opt, callbacks=Callbacks()): function generate_individual (line 889) | def generate_individual(input_ranges, individual_length): function run (line 919) | def run(**kwargs): FILE: utils/__init__.py function emojis (line 9) | def emojis(str=""): class TryExcept (line 14) | class TryExcept(contextlib.ContextDecorator): method __init__ (line 17) | def __init__(self, msg=""): method __enter__ (line 21) | def __enter__(self): method __exit__ (line 25) | def __exit__(self, exc_type, value, traceback): function threaded (line 34) | def threaded(func): function join_threads (line 46) | def join_threads(verbose=False): function notebook_init (line 59) | def notebook_init(verbose=True): FILE: utils/activations.py class SiLU (line 9) | class SiLU(nn.Module): method forward (line 13) | def forward(x): class Hardswish (line 21) | class Hardswish(nn.Module): method forward (line 25) | def forward(x): class Mish (line 33) | class Mish(nn.Module): method forward (line 37) | def forward(x): class MemoryEfficientMish (line 42) | class MemoryEfficientMish(nn.Module): class F (line 45) | class F(torch.autograd.Function): method forward (line 49) | def forward(ctx, x): method backward (line 55) | def backward(ctx, grad_output): method forward (line 62) | def forward(self, x): class FReLU (line 67) | class FReLU(nn.Module): method __init__ (line 70) | def __init__(self, c1, k=3): # ch_in, kernel method forward (line 76) | def forward(self, x): class AconC (line 84) | class AconC(nn.Module): method __init__ (line 91) | def __init__(self, c1): method forward (line 98) | def forward(self, x): class MetaAconC (line 104) | class MetaAconC(nn.Module): method __init__ (line 111) | def __init__(self, c1, k=1, s=1, r=16): method forward (line 122) | def forward(self, x): FILE: utils/augmentations.py class Albumentations (line 20) | class Albumentations: method __init__ (line 23) | def __init__(self, size=640): method __call__ (line 50) | def __call__(self, im, labels, p=1.0): function normalize (line 58) | def normalize(x, mean=IMAGENET_MEAN, std=IMAGENET_STD, inplace=False): function denormalize (line 66) | def denormalize(x, mean=IMAGENET_MEAN, std=IMAGENET_STD): function augment_hsv (line 73) | def augment_hsv(im, hgain=0.5, sgain=0.5, vgain=0.5): function hist_equalize (line 89) | def hist_equalize(im, clahe=True, bgr=False): function replicate (line 100) | def replicate(im, labels): function letterbox (line 120) | def letterbox(im, new_shape=(640, 640), color=(114, 114, 114), auto=True... function random_perspective (line 153) | def random_perspective( function copy_paste (line 235) | def copy_paste(im, labels, segments, p=0.5): function cutout (line 260) | def cutout(im, labels, p=0.5): function mixup (line 290) | def mixup(im, labels, im2, labels2): function box_candidates (line 301) | def box_candidates(box1, box2, wh_thr=2, ar_thr=100, area_thr=0.1, eps=1... function classify_albumentations (line 313) | def classify_albumentations( function classify_transforms (line 358) | def classify_transforms(size=224): class LetterBox (line 365) | class LetterBox: method __init__ (line 368) | def __init__(self, size=(640, 640), auto=False, stride=32): method __call__ (line 377) | def __call__(self, im): class CenterCrop (line 392) | class CenterCrop: method __init__ (line 395) | def __init__(self, size=640): method __call__ (line 400) | def __call__(self, im): class ToTensor (line 411) | class ToTensor: method __init__ (line 414) | def __init__(self, half=False): method __call__ (line 419) | def __call__(self, im): FILE: utils/autoanchor.py function check_anchor_order (line 17) | def check_anchor_order(m): function check_anchors (line 28) | def check_anchors(dataset, model, thr=4.0, imgsz=640): function kmean_anchors (line 66) | def kmean_anchors(dataset="./data/coco128.yaml", n=9, img_size=640, thr=... FILE: utils/autobatch.py function check_train_batch_size (line 13) | def check_train_batch_size(model, imgsz=640, amp=True): function autobatch (line 19) | def autobatch(model, imgsz=640, fraction=0.8, batch_size=16): FILE: utils/callbacks.py class Callbacks (line 7) | class Callbacks: method __init__ (line 10) | def __init__(self): method register_action (line 35) | def register_action(self, hook, name="", callback=None): method get_registered_actions (line 47) | def get_registered_actions(self, hook=None): method run (line 55) | def run(self, hook, *args, thread=False, **kwargs): FILE: utils/dataloaders.py function get_hash (line 75) | def get_hash(paths): function exif_size (line 83) | def exif_size(img): function exif_transpose (line 93) | def exif_transpose(image): function seed_worker (line 120) | def seed_worker(worker_id): class SmartDistributedSampler (line 132) | class SmartDistributedSampler(distributed.DistributedSampler): method __iter__ (line 135) | def __iter__(self): function create_dataloader (line 159) | def create_dataloader( class InfiniteDataLoader (line 220) | class InfiniteDataLoader(dataloader.DataLoader): method __init__ (line 226) | def __init__(self, *args, **kwargs): method __len__ (line 234) | def __len__(self): method __iter__ (line 238) | def __iter__(self): class _RepeatSampler (line 244) | class _RepeatSampler: method __init__ (line 251) | def __init__(self, sampler): method __iter__ (line 255) | def __iter__(self): class LoadScreenshots (line 261) | class LoadScreenshots: method __init__ (line 264) | def __init__(self, source, img_size=640, stride=32, auto=True, transfo... method __iter__ (line 297) | def __iter__(self): method __next__ (line 301) | def __next__(self): class LoadImages (line 318) | class LoadImages: method __init__ (line 321) | def __init__(self, path, img_size=640, stride=32, auto=True, transform... method __iter__ (line 358) | def __iter__(self): method __next__ (line 363) | def __next__(self): method _new_video (line 404) | def _new_video(self, path): method _cv2_rotate (line 412) | def _cv2_rotate(self, im): method __len__ (line 422) | def __len__(self): class LoadStreams (line 427) | class LoadStreams: method __init__ (line 430) | def __init__(self, sources="file.streams", img_size=640, stride=32, au... method update (line 478) | def update(self, i, cap, stream): method __iter__ (line 494) | def __iter__(self): method __next__ (line 499) | def __next__(self): method __len__ (line 518) | def __len__(self): function img2label_paths (line 523) | def img2label_paths(img_paths): class LoadImagesAndLabels (line 531) | class LoadImagesAndLabels(Dataset): method __init__ (line 537) | def __init__( method check_cache_ram (line 697) | def check_cache_ram(self, safety_margin=0.1, prefix=""): method cache_labels (line 716) | def cache_labels(self, path=Path("./labels.cache"), prefix=""): method __len__ (line 756) | def __len__(self): method __getitem__ (line 766) | def __getitem__(self, index): method load_image (line 842) | def load_image(self, i): method cache_images_to_disk (line 866) | def cache_images_to_disk(self, i): method load_mosaic (line 872) | def load_mosaic(self, index): method load_mosaic9 (line 932) | def load_mosaic9(self, index): method collate_fn (line 1014) | def collate_fn(batch): method collate_fn4 (line 1022) | def collate_fn4(batch): function flatten_recursive (line 1051) | def flatten_recursive(path=DATASETS_DIR / "coco128"): function extract_boxes (line 1061) | def extract_boxes(path=DATASETS_DIR / "coco128"): function autosplit (line 1099) | def autosplit(path=DATASETS_DIR / "coco128/images", weights=(0.9, 0.1, 0... function verify_image_label (line 1126) | def verify_image_label(args): class HUBDatasetStats (line 1177) | class HUBDatasetStats: method __init__ (line 1192) | def __init__(self, path="coco128.yaml", autodownload=False): method _find_yaml (line 1213) | def _find_yaml(dir): method _unzip (line 1225) | def _unzip(self, path): method _hub_ops (line 1235) | def _hub_ops(self, f, max_dim=1920): method get_json (line 1253) | def get_json(self, save=False, verbose=False): method process_images (line 1291) | def process_images(self): class ClassificationDataset (line 1305) | class ClassificationDataset(torchvision.datasets.ImageFolder): method __init__ (line 1314) | def __init__(self, root, augment, imgsz, cache=False): method __getitem__ (line 1325) | def __getitem__(self, i): function create_classification_dataloader (line 1343) | def create_classification_dataloader( FILE: utils/downloads.py function is_url (line 13) | def is_url(url, check=True): function gsutil_getsize (line 24) | def gsutil_getsize(url=""): function url_getsize (line 33) | def url_getsize(url="https://ultralytics.com/images/bus.jpg"): function curl_download (line 39) | def curl_download(url, filename, *, silent: bool = False) -> bool: function safe_download (line 59) | def safe_download(file, url, url2=None, min_bytes=1e0, error_msg=""): function attempt_download (line 86) | def attempt_download(file, repo="ultralytics/yolov5", release="v7.0"): FILE: utils/flask_rest_api/restapi.py function predict (line 18) | def predict(model): FILE: utils/general.py function is_ascii (line 77) | def is_ascii(s=""): function is_chinese (line 83) | def is_chinese(s="人工智能"): function is_colab (line 88) | def is_colab(): function is_jupyter (line 93) | def is_jupyter(): function is_kaggle (line 107) | def is_kaggle(): function is_docker (line 112) | def is_docker() -> bool: function is_writeable (line 123) | def is_writeable(dir, test=False): function set_logging (line 140) | def set_logging(name=LOGGING_NAME, verbose=True): function user_config_dir (line 174) | def user_config_dir(dir="Ultralytics", env_var="YOLOV5_CONFIG_DIR"): class Profile (line 191) | class Profile(contextlib.ContextDecorator): method __init__ (line 194) | def __init__(self, t=0.0, device: torch.device = None): method __enter__ (line 200) | def __enter__(self): method __exit__ (line 205) | def __exit__(self, type, value, traceback): method time (line 210) | def time(self): class Timeout (line 217) | class Timeout(contextlib.ContextDecorator): method __init__ (line 220) | def __init__(self, seconds, *, timeout_msg="", suppress_timeout_errors... method _timeout_handler (line 226) | def _timeout_handler(self, signum, frame): method __enter__ (line 230) | def __enter__(self): method __exit__ (line 236) | def __exit__(self, exc_type, exc_val, exc_tb): class WorkingDirectory (line 244) | class WorkingDirectory(contextlib.ContextDecorator): method __init__ (line 247) | def __init__(self, new_dir): method __enter__ (line 252) | def __enter__(self): method __exit__ (line 256) | def __exit__(self, exc_type, exc_val, exc_tb): function methods (line 261) | def methods(instance): function print_args (line 266) | def print_args(args: dict | None = None, show_file=True, show_func=False): function init_seeds (line 281) | def init_seeds(seed=0, deterministic=False): function intersect_dicts (line 299) | def intersect_dicts(da, db, exclude=()): function get_default_args (line 306) | def get_default_args(func): function get_latest_run (line 312) | def get_latest_run(search_dir="."): function file_age (line 318) | def file_age(path=__file__): function file_date (line 324) | def file_date(path=__file__): function file_size (line 330) | def file_size(path): function check_online (line 342) | def check_online(): function git_describe (line 359) | def git_describe(path=ROOT): function check_git_status (line 373) | def check_git_status(repo="ultralytics/yolov5", branch="master"): function check_git_info (line 402) | def check_git_info(path="."): function check_python (line 420) | def check_python(minimum="3.8.0"): function check_version (line 425) | def check_version(current="0.0.0", minimum="0.0.0", name="version ", pin... function check_img_size (line 437) | def check_img_size(imgsz, s=32, floor=0): function check_imshow (line 449) | def check_imshow(warn=False): function check_suffix (line 465) | def check_suffix(file="yolov5s.pt", suffix=(".pt",), msg=""): function check_yaml (line 476) | def check_yaml(file, suffix=(".yaml", ".yml")): function check_file (line 481) | def check_file(file, suffix=""): function check_font (line 511) | def check_font(font=FONT, progress=False): function check_dataset (line 521) | def check_dataset(data, autodownload=True): function check_amp (line 586) | def check_amp(model): function yaml_load (line 614) | def yaml_load(file="data.yaml"): function yaml_save (line 620) | def yaml_save(file="data.yaml", data=None): function unzip_file (line 630) | def unzip_file(file, path=None, exclude=(".DS_Store", "__MACOSX")): function url2file (line 642) | def url2file(url): function download (line 651) | def download(url, dir=".", unzip=True, delete=True, curl=False, threads=... function make_divisible (line 698) | def make_divisible(x, divisor): function clean_str (line 705) | def clean_str(s): function one_cycle (line 712) | def one_cycle(y1=0.0, y2=1.0, steps=100): function colorstr (line 720) | def colorstr(*input): function labels_to_class_weights (line 750) | def labels_to_class_weights(labels, nc=80): function labels_to_image_weights (line 769) | def labels_to_image_weights(labels, nc=80, class_weights=np.ones(80)): function coco80_to_coco91_class (line 776) | def coco80_to_coco91_class(): function xyxy2xywh (line 869) | def xyxy2xywh(x): function xywh2xyxy (line 879) | def xywh2xyxy(x): function xywhn2xyxy (line 889) | def xywhn2xyxy(x, w=640, h=640, padw=0, padh=0): function xyxy2xywhn (line 899) | def xyxy2xywhn(x, w=640, h=640, clip=False, eps=0.0): function xyn2xy (line 911) | def xyn2xy(x, w=640, h=640, padw=0, padh=0): function segment2box (line 919) | def segment2box(segment, width=640, height=640): function segments2boxes (line 930) | def segments2boxes(segments): function resample_segments (line 939) | def resample_segments(segments, n=1000): function scale_boxes (line 949) | def scale_boxes(img1_shape, boxes, img0_shape, ratio_pad=None): function scale_segments (line 965) | def scale_segments(img1_shape, segments, img0_shape, ratio_pad=None, nor... function clip_boxes (line 984) | def clip_boxes(boxes, shape): function clip_segments (line 996) | def clip_segments(segments, shape): function non_max_suppression (line 1006) | def non_max_suppression( function strip_optimizer (line 1118) | def strip_optimizer(f="best.pt", s=""): function print_mutation (line 1138) | def print_mutation(keys, results, hyp, save_dir, bucket, prefix=colorstr... function apply_classifier (line 1193) | def apply_classifier(x, model, img, im0): function increment_path (line 1228) | def increment_path(path, exist_ok=False, sep="", mkdir=False): function imread (line 1262) | def imread(filename, flags=cv2.IMREAD_COLOR): function imwrite (line 1269) | def imwrite(filename, img): function imshow (line 1278) | def imshow(path, im): FILE: utils/loggers/__init__.py function SummaryWriter (line 25) | def SummaryWriter(*args): function _json_default (line 64) | def _json_default(value): class Loggers (line 77) | class Loggers: method __init__ (line 80) | def __init__(self, save_dir=None, weights=None, opt=None, hyp=None, lo... method remote_dataset (line 158) | def remote_dataset(self): method on_train_start (line 170) | def on_train_start(self): method on_pretrain_routine_start (line 175) | def on_pretrain_routine_start(self): method on_pretrain_routine_end (line 180) | def on_pretrain_routine_end(self, labels, names): method on_train_batch_end (line 193) | def on_train_batch_end(self, model, ni, imgs, targets, paths, vals): method on_train_epoch_end (line 214) | def on_train_epoch_end(self, epoch): method on_val_start (line 222) | def on_val_start(self): method on_val_image_end (line 227) | def on_val_image_end(self, pred, predn, path, names, im): method on_val_batch_end (line 234) | def on_val_batch_end(self, batch_i, im, targets, paths, shapes, out): method on_val_end (line 239) | def on_val_end(self, nt, tp, fp, p, r, f1, ap, ap50, ap_class, confusi... method on_fit_epoch_end (line 251) | def on_fit_epoch_end(self, vals, epoch, best_fitness, fi): method on_model_save (line 290) | def on_model_save(self, last, epoch, final_epoch, best_fitness, fi): method on_train_end (line 303) | def on_train_end(self, last, best, epoch, results): method on_params_update (line 339) | def on_params_update(self, params: dict): class GenericLogger (line 349) | class GenericLogger: method __init__ (line 359) | def __init__(self, opt, console_logger, include=("tb", "wandb", "clear... method log_metrics (line 394) | def log_metrics(self, metrics, epoch): method log_images (line 413) | def log_images(self, files, name="Images", epoch=0): method log_graph (line 431) | def log_graph(self, model, imgsz=(640, 640)): method log_model (line 436) | def log_model(self, model_path, epoch=0, metadata=None): method update_params (line 448) | def update_params(self, params): function log_tensorboard_graph (line 456) | def log_tensorboard_graph(tb, model, imgsz=(640, 640)): function web_project_name (line 469) | def web_project_name(project): FILE: utils/loggers/clearml/clearml_utils.py function construct_dataset (line 23) | def construct_dataset(clearml_info_string): class ClearmlLogger (line 65) | class ClearmlLogger: method __init__ (line 75) | def __init__(self, opt, hyp): method log_scalars (line 127) | def log_scalars(self, metrics, epoch): method log_model (line 138) | def log_model(self, model_path, model_name, epoch=0): method log_summary (line 150) | def log_summary(self, metrics): method log_plot (line 159) | def log_plot(self, title, plot_path): method log_debug_samples (line 173) | def log_debug_samples(self, files, title="Debug Samples"): method log_image_with_boxes (line 188) | def log_image_with_boxes(self, image_path, boxes, class_names, image, ... FILE: utils/loggers/comet/__init__.py class CometLogger (line 66) | class CometLogger: method __init__ (line 69) | def __init__(self, opt, hyp, run_id=None, job_type="Training", **exper... method _get_experiment (line 170) | def _get_experiment(self, mode, experiment_id=None): method log_metrics (line 203) | def log_metrics(self, log_dict, **kwargs): method log_parameters (line 207) | def log_parameters(self, log_dict, **kwargs): method log_asset (line 211) | def log_asset(self, asset_path, **kwargs): method log_asset_data (line 215) | def log_asset_data(self, asset, **kwargs): method log_image (line 219) | def log_image(self, img, **kwargs): method log_model (line 223) | def log_model(self, path, opt, epoch, fitness_score, best_model=False): method check_dataset (line 247) | def check_dataset(self, data_file): method log_predictions (line 260) | def log_predictions(self, image, labelsn, path, shape, predn): method preprocess_prediction (line 301) | def preprocess_prediction(self, image, labels, shape, pred): method add_assets_to_artifact (line 321) | def add_assets_to_artifact(self, artifact, path, asset_path, split): method upload_dataset_artifact (line 347) | def upload_dataset_artifact(self): method download_dataset_artifact (line 372) | def download_dataset_artifact(self, artifact_path): method update_data_paths (line 392) | def update_data_paths(self, data_dict): method on_pretrain_routine_end (line 405) | def on_pretrain_routine_end(self, paths): method on_train_start (line 418) | def on_train_start(self): method on_train_epoch_start (line 422) | def on_train_epoch_start(self): method on_train_epoch_end (line 426) | def on_train_epoch_end(self, epoch): method on_train_batch_start (line 432) | def on_train_batch_start(self): method on_train_batch_end (line 436) | def on_train_batch_end(self, log_dict, step): method on_train_end (line 444) | def on_train_end(self, files, save_dir, last, best, epoch, results): method on_val_start (line 472) | def on_val_start(self): method on_val_batch_start (line 476) | def on_val_batch_start(self): method on_val_batch_end (line 480) | def on_val_batch_end(self, batch_i, images, targets, paths, shapes, ou... method on_val_end (line 499) | def on_val_end(self, nt, tp, fp, p, r, f1, ap, ap50, ap_class, confusi... method on_fit_epoch_end (line 534) | def on_fit_epoch_end(self, result, epoch): method on_model_save (line 538) | def on_model_save(self, last, epoch, final_epoch, best_fitness, fi): method on_params_update (line 543) | def on_params_update(self, params): method finish_run (line 547) | def finish_run(self): FILE: utils/loggers/comet/comet_utils.py function download_model_checkpoint (line 21) | def download_model_checkpoint(opt, experiment): function set_opt_parameters (line 69) | def set_opt_parameters(opt, experiment): function check_comet_weights (line 99) | def check_comet_weights(opt): function check_comet_resume (line 122) | def check_comet_resume(opt): FILE: utils/loggers/comet/hpo.py function get_args (line 29) | def get_args(known=False): function run (line 90) | def run(parameters, opt): FILE: utils/loggers/wandb/wandb_utils.py class WandbLogger (line 33) | class WandbLogger: method __init__ (line 45) | def __init__(self, opt, run_id=None, job_type="Training"): method setup_training (line 82) | def setup_training(self, opt): method log_model (line 113) | def log_model(self, path, opt, epoch, fitness_score, best_model=False): method val_one_image (line 147) | def val_one_image(self, pred, predn, path, names, im): method log (line 151) | def log(self, log_dict): method end_epoch (line 161) | def end_epoch(self): method finish_run (line 179) | def finish_run(self): function all_logging_disabled (line 190) | def all_logging_disabled(highest_level=logging.CRITICAL): FILE: utils/loss.py function smooth_BCE (line 11) | def smooth_BCE(eps=0.1): class BCEBlurWithLogitsLoss (line 18) | class BCEBlurWithLogitsLoss(nn.Module): method __init__ (line 21) | def __init__(self, alpha=0.05): method forward (line 29) | def forward(self, pred, true): class FocalLoss (line 42) | class FocalLoss(nn.Module): method __init__ (line 45) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 56) | def forward(self, pred, true): class QFocalLoss (line 77) | class QFocalLoss(nn.Module): method __init__ (line 80) | def __init__(self, loss_fcn, gamma=1.5, alpha=0.25): method forward (line 89) | def forward(self, pred, true): class ComputeLoss (line 108) | class ComputeLoss: method __init__ (line 114) | def __init__(self, model, autobalance=False): method __call__ (line 141) | def __call__(self, p, targets): # predictions, targets method build_targets (line 193) | def build_targets(self, p, targets): FILE: utils/metrics.py function fitness (line 18) | def fitness(x): function smooth (line 24) | def smooth(y, f=0.05): function ap_per_class (line 32) | def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir=".... function compute_ap (line 101) | def compute_ap(recall, precision): class ConfusionMatrix (line 132) | class ConfusionMatrix: method __init__ (line 135) | def __init__(self, nc, conf=0.25, iou_thres=0.45): method process_batch (line 142) | def process_batch(self, detections, labels): method tp_fp (line 190) | def tp_fp(self): method plot (line 200) | def plot(self, normalize=True, save_dir="", names=()): method print (line 232) | def print(self): function bbox_iou (line 238) | def bbox_iou(box1, box2, xywh=True, GIoU=False, DIoU=False, CIoU=False, ... function box_iou (line 282) | def box_iou(box1, box2, eps=1e-7): function bbox_ioa (line 303) | def bbox_ioa(box1, box2, eps=1e-7): function wh_iou (line 332) | def wh_iou(wh1, wh2, eps=1e-7): function plot_pr_curve (line 346) | def plot_pr_curve(px, py, ap, save_dir=Path("pr_curve.png"), names=()): function plot_mc_curve (line 371) | def plot_mc_curve(px, py, save_dir=Path("mc_curve.png"), names=(), xlabe... FILE: utils/plots.py class Colors (line 31) | class Colors: method __init__ (line 34) | def __init__(self): method __call__ (line 65) | def __call__(self, i, bgr=False): method hex2rgb (line 71) | def hex2rgb(h): function feature_visualization (line 79) | def feature_visualization(x, module_type, stage, n=32, save_dir=Path("ru... function hist2d (line 110) | def hist2d(x, y, n=100): function butter_lowpass_filtfilt (line 122) | def butter_lowpass_filtfilt(data, cutoff=1500, fs=50000, order=5): function output_to_target (line 139) | def output_to_target(output, max_det=300): function plot_images (line 152) | def plot_images(images, targets, paths=None, fname="images.jpg", names=N... function plot_lr_scheduler (line 216) | def plot_lr_scheduler(optimizer, scheduler, epochs=300, save_dir=""): function plot_val_txt (line 233) | def plot_val_txt(): function plot_targets_txt (line 254) | def plot_targets_txt(): function plot_val_study (line 270) | def plot_val_study(file="", dir="", x=None): function plot_labels (line 325) | def plot_labels(labels, names=(), save_dir=Path("")): function imshow_cls (line 370) | def imshow_cls(im, labels=None, pred=None, names=None, nmax=25, verbose=... function plot_evolve (line 400) | def plot_evolve(evolve_csv="path/to/evolve.csv"): function plot_results (line 430) | def plot_results(file="path/to/results.csv", dir=""): function profile_idetection (line 460) | def profile_idetection(start=0, stop=0, labels=(), save_dir=""): function save_one_box (line 494) | def save_one_box(xyxy, im, file=Path("im.jpg"), gain=1.02, pad=10, squar... FILE: utils/segment/augmentations.py function mixup (line 14) | def mixup(im, labels, segments, im2, labels2, segments2): function random_perspective (line 26) | def random_perspective( FILE: utils/segment/dataloaders.py function create_dataloader (line 21) | def create_dataloader( class LoadImagesAndLabelsAndMasks (line 86) | class LoadImagesAndLabelsAndMasks(LoadImagesAndLabels): # for training/... method __init__ (line 89) | def __init__( method __getitem__ (line 130) | def __getitem__(self, index): method load_mosaic (line 237) | def load_mosaic(self, index): method collate_fn (line 298) | def collate_fn(batch): function polygon2mask (line 307) | def polygon2mask(img_size, polygons, color=1, downsample_ratio=1): function polygons2masks (line 326) | def polygons2masks(img_size, polygons, color, downsample_ratio=1): function polygons2masks_overlap (line 340) | def polygons2masks_overlap(img_size, segments, downsample_ratio=1): FILE: utils/segment/general.py function crop_mask (line 9) | def crop_mask(masks, boxes): function process_mask_upsample (line 24) | def process_mask_upsample(protos, masks_in, bboxes, shape): function process_mask (line 43) | def process_mask(protos, masks_in, bboxes, shape, upsample=False): function process_mask_native (line 71) | def process_mask_native(protos, masks_in, bboxes, shape): function scale_image (line 96) | def scale_image(im1_shape, masks, im0_shape, ratio_pad=None): function mask_iou (line 120) | def mask_iou(mask1, mask2, eps=1e-7): function masks_iou (line 137) | def masks_iou(mask1, mask2, eps=1e-7): function masks2segments (line 154) | def masks2segments(masks, strategy="largest"): FILE: utils/segment/loss.py class ComputeLoss (line 14) | class ComputeLoss: method __init__ (line 17) | def __init__(self, model, autobalance=False, overlap=False): method __call__ (line 47) | def __call__(self, preds, targets, masks): # predictions, targets, model method single_mask_loss (line 115) | def single_mask_loss(self, gt_mask, pred, proto, xyxy, area): method build_targets (line 121) | def build_targets(self, p, targets): FILE: utils/segment/metrics.py function fitness (line 9) | def fitness(x): function ap_per_class_box_and_mask (line 15) | def ap_per_class_box_and_mask( class Metric (line 56) | class Metric: method __init__ (line 59) | def __init__(self) -> None: method ap50 (line 70) | def ap50(self): method ap (line 79) | def ap(self): method mp (line 88) | def mp(self): method mr (line 97) | def mr(self): method map50 (line 106) | def map50(self): method map (line 115) | def map(self): method mean_results (line 123) | def mean_results(self): method class_result (line 127) | def class_result(self, i): method get_maps (line 131) | def get_maps(self, nc): method update (line 138) | def update(self, results): class Metrics (line 151) | class Metrics: method __init__ (line 154) | def __init__(self) -> None: method update (line 159) | def update(self, results): method mean_results (line 167) | def mean_results(self): method class_result (line 171) | def class_result(self, i): method get_maps (line 175) | def get_maps(self, nc): method ap_class_index (line 182) | def ap_class_index(self): FILE: utils/segment/plots.py function plot_images_and_masks (line 19) | def plot_images_and_masks(images, targets, masks, paths=None, fname="ima... function plot_results_with_masks (line 115) | def plot_results_with_masks(file="path/to/results.csv", dir="", best=True): FILE: utils/torch_utils.py function smart_inference_mode (line 36) | def smart_inference_mode(torch_1_9=check_version(torch.__version__, "1.9... function smartCrossEntropyLoss (line 46) | def smartCrossEntropyLoss(label_smoothing=0.0): function smart_DDP (line 55) | def smart_DDP(model): function reshape_classifier_output (line 67) | def reshape_classifier_output(model, n=1000): function torch_distributed_zero_first (line 91) | def torch_distributed_zero_first(local_rank: int): function device_count (line 102) | def device_count(): function select_device (line 112) | def select_device(device="", batch_size=0, newline=True): function time_sync (line 149) | def time_sync(): function profile (line 156) | def profile(input, ops, n=10, device=None): function is_parallel (line 210) | def is_parallel(model): function de_parallel (line 215) | def de_parallel(model): function initialize_weights (line 220) | def initialize_weights(model): function find_modules (line 235) | def find_modules(model, mclass=nn.Conv2d): function sparsity (line 240) | def sparsity(model): function prune (line 249) | def prune(model, amount=0.3): function fuse_conv_and_bn (line 260) | def fuse_conv_and_bn(conv, bn): function model_info (line 293) | def model_info(model, verbose=False, imgsz=640): function scale_img (line 323) | def scale_img(img, ratio=1.0, same_shape=False, gs=32): # img(16,3,256,... function copy_attr (line 337) | def copy_attr(a, b, include=(), exclude=()): function smart_optimizer (line 346) | def smart_optimizer(model, name="Adam", lr=0.001, momentum=0.9, decay=1e... function smart_hub_load (line 382) | def smart_hub_load(repo="ultralytics/yolov5", model="yolov5s", **kwargs): function smart_resume (line 394) | def smart_resume(ckpt, optimizer, ema=None, weights="yolov5s.pt", epochs... class EarlyStopping (line 416) | class EarlyStopping: method __init__ (line 419) | def __init__(self, patience=30): method __call__ (line 426) | def __call__(self, epoch, fitness): class ModelEMA (line 444) | class ModelEMA: method __init__ (line 450) | def __init__(self, model, decay=0.9999, tau=2000, updates=0): method update (line 460) | def update(self, model): method update_attr (line 472) | def update_attr(self, model, include=(), exclude=("process_group", "re... FILE: utils/triton.py class TritonRemoteModel (line 11) | class TritonRemoteModel: method __init__ (line 18) | def __init__(self, url: str): method runtime (line 50) | def runtime(self): method __call__ (line 54) | def __call__(self, *args, **kwargs) -> torch.Tensor | tuple[torch.Tens... method _create_inputs (line 68) | def _create_inputs(self, *args, **kwargs): FILE: val.py function save_one_txt (line 64) | def save_one_txt(predn, save_conf, shape, file): function save_one_json (line 96) | def save_one_json(predn, jdict, path, class_map): function process_batch (line 142) | def process_batch(detections, labels, iouv): function run (line 185) | def run( function parse_opt (line 467) | def parse_opt(): function main (line 545) | def main(opt):