SYMBOL INDEX (609 symbols across 51 files) FILE: config/__init__.py class ConfigDict (line 1) | class ConfigDict(dict): function from_dict (line 6) | def from_dict(obj) -> ConfigDict: FILE: functions/div_loss.py function div_loss (line 7) | def div_loss(disc, real_x, fake_x, wp: int = 6, eps: float = 1e-6): FILE: functions/get_param_groups.py function get_param_groups (line 6) | def get_param_groups(module) -> tuple[List, List, List]: FILE: loader/m3fd.py class M3FD (line 20) | class M3FD(Dataset): method __init__ (line 28) | def __init__(self, root: str | Path, mode: Literal['train', 'val', 'pr... method __len__ (line 68) | def __len__(self) -> int: method __getitem__ (line 71) | def __getitem__(self, index: int) -> dict: method train_val_item (line 79) | def train_val_item(self, index: int) -> dict: method pred_item (line 137) | def pred_item(self, index: int) -> dict: method pred_save (line 158) | def pred_save(fus: Tensor, names: List[str | Path], shape: List[Size],... method pred_save_no_boxes (line 164) | def pred_save_no_boxes(fus: Tensor, names: List[str | Path], shape: Li... method pred_save_with_boxes (line 170) | def pred_save_with_boxes(fus: Tensor, names: List[str | Path], shape: ... method collate_fn (line 201) | def collate_fn(data: List[dict]) -> dict: FILE: loader/roadscene.py class RoadScene (line 16) | class RoadScene(Dataset): method __init__ (line 20) | def __init__(self, root: str | Path, mode: Literal['train', 'val', 'pr... method __len__ (line 52) | def __len__(self) -> int: method __getitem__ (line 55) | def __getitem__(self, index: int) -> dict: method train_val_item (line 63) | def train_val_item(self, index: int) -> dict: method pred_item (line 89) | def pred_item(self, index: int) -> dict: method pred_save (line 110) | def pred_save(fus: Tensor, names: List[str | Path], shape: List[Size]): method collate_fn (line 116) | def collate_fn(data: List[dict]) -> dict: FILE: loader/tno.py class TNO (line 16) | class TNO(Dataset): method __init__ (line 20) | def __init__(self, root: str | Path, mode: Literal['train', 'val', 'pr... method __len__ (line 52) | def __len__(self) -> int: method __getitem__ (line 55) | def __getitem__(self, index: int) -> dict: method train_val_item (line 63) | def train_val_item(self, index: int) -> dict: method pred_item (line 89) | def pred_item(self, index: int) -> dict: method pred_save (line 110) | def pred_save(fus: Tensor, names: List[str | Path], shape: List[Size]): method collate_fn (line 116) | def collate_fn(data: List[dict]) -> dict: FILE: loader/utils/checker.py function check_image (line 15) | def check_image(root: Path, img_list: List[str]): function check_iqa (line 24) | def check_iqa(root: Path, img_list: List[str], config: ConfigDict): function check_labels (line 41) | def check_labels(root: Path, img_list: List[str]) -> List[Tensor]: function check_mask (line 54) | def check_mask(root: Path, img_list: List[str], config: ConfigDict): function get_max_size (line 71) | def get_max_size(root: Path, img_list: List[str]): FILE: loader/utils/reader.py function gray_read (line 13) | def gray_read(img_path: str | Path) -> Tensor: function ycbcr_read (line 19) | def ycbcr_read(img_path: str | Path) -> Tuple[Tensor, Tensor]: function label_read (line 27) | def label_read(label_path: str | Path) -> Tensor: function img_write (line 34) | def img_write(img_t: Tensor, img_path: str | Path): function label_write (line 41) | def label_write(pred_i: Tensor, txt_path: str | Path): FILE: module/detect/models/common.py function autopad (line 40) | def autopad(k, p=None): # kernel, padding class Conv (line 47) | class Conv(nn.Module): method __init__ (line 49) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 55) | def forward(self, x): method forward_fuse (line 58) | def forward_fuse(self, x): class DWConv (line 62) | class DWConv(Conv): method __init__ (line 64) | def __init__(self, c1, c2, k=1, s=1, act=True): # ch_in, ch_out, kern... class DWConvTranspose2d (line 68) | class DWConvTranspose2d(nn.ConvTranspose2d): method __init__ (line 70) | def __init__(self, c1, c2, k=1, s=1, p1=0, p2=0): # ch_in, ch_out, ke... class TransformerLayer (line 74) | class TransformerLayer(nn.Module): method __init__ (line 76) | def __init__(self, c, num_heads): method forward (line 85) | def forward(self, x): class TransformerBlock (line 91) | class TransformerBlock(nn.Module): method __init__ (line 93) | def __init__(self, c1, c2, num_heads, num_layers): method forward (line 102) | def forward(self, x): class Bottleneck (line 110) | class Bottleneck(nn.Module): method __init__ (line 112) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5): # ch_in, ch_ou... method forward (line 119) | def forward(self, x): class BottleneckCSP (line 123) | class BottleneckCSP(nn.Module): method __init__ (line 125) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 136) | def forward(self, x): class CrossConv (line 142) | class CrossConv(nn.Module): method __init__ (line 144) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): method forward (line 152) | def forward(self, x): class C3 (line 156) | class C3(nn.Module): method __init__ (line 158) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): # ch_in, ... method forward (line 166) | def forward(self, x): class C3x (line 170) | class C3x(C3): method __init__ (line 172) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3TR (line 178) | class C3TR(C3): method __init__ (line 180) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class C3SPP (line 186) | class C3SPP(C3): method __init__ (line 188) | def __init__(self, c1, c2, k=(5, 9, 13), n=1, shortcut=True, g=1, e=0.5): class C3Ghost (line 194) | class C3Ghost(C3): method __init__ (line 196) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5): class SPP (line 202) | class SPP(nn.Module): method __init__ (line 204) | def __init__(self, c1, c2, k=(5, 9, 13)): method forward (line 211) | def forward(self, x): class SPPF (line 218) | class SPPF(nn.Module): method __init__ (line 220) | def __init__(self, c1, c2, k=5): # equivalent to SPP(k=(5, 9, 13)) method forward (line 227) | def forward(self, x): class Focus (line 236) | class Focus(nn.Module): method __init__ (line 238) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True): # ch_in,... method forward (line 243) | def forward(self, x): # x(b,c,w,h) -> y(b,4c,w/2,h/2) class GhostConv (line 248) | class GhostConv(nn.Module): method __init__ (line 250) | def __init__(self, c1, c2, k=1, s=1, g=1, act=True): # ch_in, ch_out,... method forward (line 256) | def forward(self, x): class GhostBottleneck (line 261) | class GhostBottleneck(nn.Module): method __init__ (line 263) | def __init__(self, c1, c2, k=3, s=1): # ch_in, ch_out, kernel, stride method forward (line 278) | def forward(self, x): class Contract (line 282) | class Contract(nn.Module): method __init__ (line 284) | def __init__(self, gain=2): method forward (line 288) | def forward(self, x): class Expand (line 296) | class Expand(nn.Module): method __init__ (line 298) | def __init__(self, gain=2): method forward (line 302) | def forward(self, x): class Concat (line 310) | class Concat(nn.Module): method __init__ (line 312) | def __init__(self, dimension=1): method forward (line 316) | def forward(self, x): class DetectMultiBackend (line 320) | class DetectMultiBackend(nn.Module): method __init__ (line 322) | def __init__(self, weights='yolov5s.pt', device=torch.device('cpu'), d... method forward (line 462) | def forward(self, im, augment=False, visualize=False, val=False): method warmup (line 523) | def warmup(self, imgsz=(1, 3, 640, 640)): method model_type (line 532) | def model_type(p='path/to/model.pt'): method _load_metadata (line 544) | def _load_metadata(f='path/to/meta.yaml'): class AutoShape (line 551) | class AutoShape(nn.Module): method __init__ (line 561) | def __init__(self, model, verbose=True): method _apply (line 570) | def _apply(self, fn): method forward (line 582) | def forward(self, imgs, size=640, augment=False, profile=False): class Detections (line 646) | class Detections: method __init__ (line 648) | def __init__(self, imgs, pred, files, times=(0, 0, 0, 0), names=None, ... method display (line 665) | def display(self, pprint=False, show=False, save=False, crop=False, re... method print (line 710) | def print(self): method show (line 714) | def show(self, labels=True): method save (line 717) | def save(self, labels=True, save_dir='runs/detect/exp'): method crop (line 721) | def crop(self, save=True, save_dir='runs/detect/exp'): method render (line 725) | def render(self, labels=True): method pandas (line 729) | def pandas(self): method tolist (line 739) | def tolist(self): method __len__ (line 748) | def __len__(self): method __str__ (line 751) | def __str__(self): class Classify (line 756) | class Classify(nn.Module): method __init__ (line 758) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1): # ch_in, ch_out, k... method forward (line 764) | def forward(self, x): FILE: module/detect/models/experimental.py class Sum (line 15) | class Sum(nn.Module): method __init__ (line 17) | def __init__(self, n, weight=False): # n: number of inputs method forward (line 24) | def forward(self, x): class MixConv2d (line 36) | class MixConv2d(nn.Module): method __init__ (line 38) | def __init__(self, c1, c2, k=(1, 3), s=1, equal_ch=True): # ch_in, ch... method forward (line 57) | def forward(self, x): class Ensemble (line 61) | class Ensemble(nn.ModuleList): method __init__ (line 63) | def __init__(self): method forward (line 66) | def forward(self, x, augment=False, profile=False, visualize=False): function attempt_load (line 74) | def attempt_load(weights, device=None, inplace=True, fuse=True): FILE: module/detect/models/tf.py class TFBN (line 38) | class TFBN(keras.layers.Layer): method __init__ (line 40) | def __init__(self, w=None): method call (line 49) | def call(self, inputs): class TFPad (line 53) | class TFPad(keras.layers.Layer): method __init__ (line 55) | def __init__(self, pad): method call (line 62) | def call(self, inputs): class TFConv (line 66) | class TFConv(keras.layers.Layer): method __init__ (line 68) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 86) | def call(self, inputs): class TFDWConv (line 90) | class TFDWConv(keras.layers.Layer): method __init__ (line 92) | def __init__(self, c1, c2, k=1, s=1, p=None, act=True, w=None): method call (line 108) | def call(self, inputs): class TFDWConvTranspose2d (line 112) | class TFDWConvTranspose2d(keras.layers.Layer): method __init__ (line 114) | def __init__(self, c1, c2, k=1, s=1, p1=0, p2=0, w=None): method call (line 131) | def call(self, inputs): class TFFocus (line 135) | class TFFocus(keras.layers.Layer): method __init__ (line 137) | def __init__(self, c1, c2, k=1, s=1, p=None, g=1, act=True, w=None): method call (line 142) | def call(self, inputs): # x(b,w,h,c) -> y(b,w/2,h/2,4c) class TFBottleneck (line 148) | class TFBottleneck(keras.layers.Layer): method __init__ (line 150) | def __init__(self, c1, c2, shortcut=True, g=1, e=0.5, w=None): # ch_i... method call (line 157) | def call(self, inputs): class TFCrossConv (line 161) | class TFCrossConv(keras.layers.Layer): method __init__ (line 163) | def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False, w=None): method call (line 170) | def call(self, inputs): class TFConv2d (line 174) | class TFConv2d(keras.layers.Layer): method __init__ (line 176) | def __init__(self, c1, c2, k, s=1, g=1, bias=True, w=None): method call (line 188) | def call(self, inputs): class TFBottleneckCSP (line 192) | class TFBottleneckCSP(keras.layers.Layer): method __init__ (line 194) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 206) | def call(self, inputs): class TFC3 (line 212) | class TFC3(keras.layers.Layer): method __init__ (line 214) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 223) | def call(self, inputs): class TFC3x (line 227) | class TFC3x(keras.layers.Layer): method __init__ (line 229) | def __init__(self, c1, c2, n=1, shortcut=True, g=1, e=0.5, w=None): method call (line 239) | def call(self, inputs): class TFSPP (line 243) | class TFSPP(keras.layers.Layer): method __init__ (line 245) | def __init__(self, c1, c2, k=(5, 9, 13), w=None): method call (line 252) | def call(self, inputs): class TFSPPF (line 257) | class TFSPPF(keras.layers.Layer): method __init__ (line 259) | def __init__(self, c1, c2, k=5, w=None): method call (line 266) | def call(self, inputs): class TFDetect (line 273) | class TFDetect(keras.layers.Layer): method __init__ (line 275) | def __init__(self, nc=80, anchors=(), ch=(), imgsz=(640, 640), w=None)... method call (line 292) | def call(self, inputs): method _make_grid (line 316) | def _make_grid(nx=20, ny=20): class TFUpsample (line 323) | class TFUpsample(keras.layers.Layer): method __init__ (line 325) | def __init__(self, size, scale_factor, mode, w=None): # warning: all ... method call (line 334) | def call(self, inputs): class TFConcat (line 338) | class TFConcat(keras.layers.Layer): method __init__ (line 340) | def __init__(self, dimension=1, w=None): method call (line 345) | def call(self, inputs): function parse_model (line 349) | def parse_model(d, ch, model, imgsz): # model_dict, input_channels(3) class TFModel (line 403) | class TFModel: method __init__ (line 405) | def __init__(self, cfg='yolov5s.yaml', ch=3, nc=None, model=None, imgs... method predict (line 421) | def predict(self, method _xywh2xyxy (line 464) | def _xywh2xyxy(xywh): class AgnosticNMS (line 470) | class AgnosticNMS(keras.layers.Layer): method call (line 472) | def call(self, input, topk_all, iou_thres, conf_thres): method _nms (line 480) | def _nms(x, topk_all=100, iou_thres=0.45, conf_thres=0.25): # agnosti... function activations (line 508) | def activations(act=nn.SiLU): function representative_dataset_gen (line 520) | def representative_dataset_gen(dataset, ncalib=100): function run (line 531) | def run( function parse_opt (line 556) | def parse_opt(): function main (line 568) | def main(opt): FILE: module/detect/models/yolo.py class Detect (line 38) | class Detect(nn.Module): method __init__ (line 43) | def __init__(self, nc=80, anchors=(), ch=(), inplace=True): # detecti... method forward (line 55) | def forward(self, x): method _make_grid (line 79) | def _make_grid(self, nx=20, ny=20, i=0): class Model (line 93) | class Model(nn.Module): method __init__ (line 95) | def __init__(self, cfg='yolov5s.yaml', ch=3, nc=None, anchors=None): ... method forward (line 133) | def forward(self, x, augment=False, profile=False, visualize=False): method _forward_augment (line 138) | def _forward_augment(self, x): method _forward_once (line 152) | def _forward_once(self, x, profile=False, visualize=False): method _descale_pred (line 165) | def _descale_pred(self, p, flips, scale, img_size): method _clip_augmented (line 182) | def _clip_augmented(self, y): method _profile_one_layer (line 193) | def _profile_one_layer(self, m, x, dt): method _initialize_biases (line 206) | def _initialize_biases(self, cf=None): # initialize biases into Detec... method _print_biases (line 216) | def _print_biases(self): method fuse (line 229) | def fuse(self): # fuse model Conv2d() + BatchNorm2d() layers method info (line 239) | def info(self, verbose=False, img_size=640): # print model information method _apply (line 242) | def _apply(self, fn): function parse_model (line 254) | def parse_model(d, ch): # model_dict, input_channels(3) FILE: module/detect/utils/__init__.py function notebook_init (line 7) | def notebook_init(verbose=True): FILE: module/detect/utils/activations.py class SiLU (line 11) | class SiLU(nn.Module): method forward (line 14) | def forward(x): class Hardswish (line 18) | class Hardswish(nn.Module): method forward (line 21) | def forward(x): class Mish (line 26) | class Mish(nn.Module): method forward (line 29) | def forward(x): class MemoryEfficientMish (line 33) | class MemoryEfficientMish(nn.Module): class F (line 35) | class F(torch.autograd.Function): method forward (line 38) | def forward(ctx, x): method backward (line 43) | def backward(ctx, grad_output): method forward (line 49) | def forward(self, x): class FReLU (line 53) | class FReLU(nn.Module): method __init__ (line 55) | def __init__(self, c1, k=3): # ch_in, kernel method forward (line 60) | def forward(self, x): class AconC (line 64) | class AconC(nn.Module): method __init__ (line 70) | def __init__(self, c1): method forward (line 76) | def forward(self, x): class MetaAconC (line 81) | class MetaAconC(nn.Module): method __init__ (line 87) | def __init__(self, c1, k=1, s=1, r=16): # ch_in, kernel, stride, r method forward (line 97) | def forward(self, x): FILE: module/detect/utils/augmentations.py class Albumentations (line 15) | class Albumentations: method __init__ (line 17) | def __init__(self): method __call__ (line 39) | def __call__(self, im, labels, p=1.0): function augment_hsv (line 46) | def augment_hsv(im, hgain=0.5, sgain=0.5, vgain=0.5): function hist_equalize (line 62) | def hist_equalize(im, clahe=True, bgr=False): function replicate (line 73) | def replicate(im, labels): function letterbox (line 90) | def letterbox(im, new_shape=(640, 640), color=(114, 114, 114), auto=True... function random_perspective (line 123) | def random_perspective( function copy_paste (line 221) | def copy_paste(im, labels, segments, p=0.5): function cutout (line 245) | def cutout(im, labels, p=0.5): function mixup (line 272) | def mixup(im, labels, im2, labels2): function box_candidates (line 280) | def box_candidates(box1, box2, wh_thr=2, ar_thr=100, area_thr=0.1, eps=1... FILE: module/detect/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 68) | def kmean_anchors(dataset='./data/coco128.yaml', n=9, img_size=640, thr=... FILE: module/detect/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.9, batch_size=16): FILE: module/detect/utils/benchmarks.py function run (line 49) | def run( function test (line 102) | def test( function parse_opt (line 134) | def parse_opt(): function main (line 151) | def main(opt): FILE: module/detect/utils/callbacks.py class Callbacks (line 7) | class Callbacks: method __init__ (line 12) | def __init__(self): method register_action (line 36) | def register_action(self, hook, name='', callback=None): method get_registered_actions (line 49) | def get_registered_actions(self, hook=None): method run (line 58) | def run(self, hook, *args, **kwargs): FILE: module/detect/utils/dataloaders.py function get_hash (line 46) | def get_hash(paths): function exif_size (line 54) | def exif_size(img): function exif_transpose (line 67) | def exif_transpose(image): function seed_worker (line 93) | def seed_worker(worker_id): function create_dataloader (line 100) | def create_dataloader( class InfiniteDataLoader (line 157) | class InfiniteDataLoader(dataloader.DataLoader): method __init__ (line 163) | def __init__(self, *args, **kwargs): method __len__ (line 168) | def __len__(self): method __iter__ (line 171) | def __iter__(self): class _RepeatSampler (line 176) | class _RepeatSampler: method __init__ (line 183) | def __init__(self, sampler): method __iter__ (line 186) | def __iter__(self): class LoadImages (line 191) | class LoadImages: method __init__ (line 193) | def __init__(self, path, img_size=640, stride=32, auto=True): method __iter__ (line 224) | def __iter__(self): method __next__ (line 228) | def __next__(self): method new_video (line 265) | def new_video(self, path): method __len__ (line 270) | def __len__(self): class LoadWebcam (line 274) | class LoadWebcam: # for inference method __init__ (line 276) | def __init__(self, pipe='0', img_size=640, stride=32): method __iter__ (line 283) | def __iter__(self): method __next__ (line 287) | def __next__(self): method __len__ (line 312) | def __len__(self): class LoadStreams (line 316) | class LoadStreams: method __init__ (line 318) | def __init__(self, sources='streams.txt', img_size=640, stride=32, aut... method update (line 364) | def update(self, i, cap, stream): method __iter__ (line 381) | def __iter__(self): method __next__ (line 385) | def __next__(self): method __len__ (line 404) | def __len__(self): function img2label_paths (line 408) | def img2label_paths(img_paths): class LoadImagesAndLabels (line 414) | class LoadImagesAndLabels(Dataset): method __init__ (line 419) | def __init__( method cache_labels (line 555) | def cache_labels(self, path=Path('./labels.cache'), prefix=''): method __len__ (line 595) | def __len__(self): method __getitem__ (line 604) | def __getitem__(self, index): method load_image (line 680) | def load_image(self, i): method cache_images_to_disk (line 698) | def cache_images_to_disk(self, i): method load_mosaic (line 704) | def load_mosaic(self, index): method load_mosaic9 (line 764) | def load_mosaic9(self, index): method collate_fn (line 843) | def collate_fn(batch): method collate_fn4 (line 850) | def collate_fn4(batch): function create_folder (line 879) | def create_folder(path='./new'): function flatten_recursive (line 886) | def flatten_recursive(path=DATASETS_DIR / 'coco128'): function extract_boxes (line 894) | def extract_boxes(path=DATASETS_DIR / 'coco128'): # from utils.dataload... function autosplit (line 928) | def autosplit(path=DATASETS_DIR / 'coco128/images', weights=(0.9, 0.1, 0... function verify_image_label (line 952) | def verify_image_label(args): function dataset_stats (line 1004) | def dataset_stats(path='coco128.yaml', autodownload=False, verbose=False... FILE: module/detect/utils/downloads.py function is_url (line 19) | def is_url(url): function gsutil_getsize (line 28) | def gsutil_getsize(url=''): function safe_download (line 34) | def safe_download(file, url, url2=None, min_bytes=1E0, error_msg=''): function attempt_download (line 55) | def attempt_download(file, repo='ultralytics/yolov5', release='v6.1'): function gdrive_download (line 107) | def gdrive_download(id='16TiPfZj7htmTyhntwcZyEEAejOUxuT6m', file='tmp.zi... function get_token (line 142) | def get_token(cookie="./cookie"): FILE: module/detect/utils/flask_rest_api/restapi.py function predict (line 19) | def predict(): FILE: module/detect/utils/general.py function is_kaggle (line 57) | def is_kaggle(): function is_writeable (line 67) | def is_writeable(dir, test=False): function set_logging (line 81) | def set_logging(name=None, verbose=VERBOSE): function user_config_dir (line 100) | def user_config_dir(dir='Ultralytics', env_var='YOLOV5_CONFIG_DIR'): class Profile (line 116) | class Profile(contextlib.ContextDecorator): method __enter__ (line 118) | def __enter__(self): method __exit__ (line 121) | def __exit__(self, type, value, traceback): class Timeout (line 125) | class Timeout(contextlib.ContextDecorator): method __init__ (line 127) | def __init__(self, seconds, *, timeout_msg='', suppress_timeout_errors... method _timeout_handler (line 132) | def _timeout_handler(self, signum, frame): method __enter__ (line 135) | def __enter__(self): method __exit__ (line 140) | def __exit__(self, exc_type, exc_val, exc_tb): class WorkingDirectory (line 147) | class WorkingDirectory(contextlib.ContextDecorator): method __init__ (line 149) | def __init__(self, new_dir): method __enter__ (line 153) | def __enter__(self): method __exit__ (line 156) | def __exit__(self, exc_type, exc_val, exc_tb): function try_except (line 160) | def try_except(func): function threaded (line 171) | def threaded(func): function methods (line 181) | def methods(instance): function print_args (line 186) | def print_args(args: Optional[dict] = None, show_file=True, show_fcn=Fal... function init_seeds (line 197) | def init_seeds(seed=0, deterministic=False): function intersect_dicts (line 215) | def intersect_dicts(da, db, exclude=()): function get_latest_run (line 220) | def get_latest_run(search_dir='.'): function is_docker (line 226) | def is_docker(): function is_colab (line 231) | def is_colab(): function is_pip (line 240) | def is_pip(): function is_ascii (line 245) | def is_ascii(s=''): function is_chinese (line 251) | def is_chinese(s='人工智能'): function emojis (line 256) | def emojis(str=''): function file_age (line 261) | def file_age(path=__file__): function file_date (line 267) | def file_date(path=__file__): function file_size (line 273) | def file_size(path): function check_online (line 285) | def check_online(): function git_describe (line 295) | def git_describe(path=ROOT): # path must be a directory function check_git_status (line 306) | def check_git_status(): function check_python (line 325) | def check_python(minimum='3.7.0'): function check_version (line 330) | def check_version(current='0.0.0', minimum='0.0.0', name='version ', pin... function check_requirements (line 343) | def check_requirements(requirements=ROOT / 'requirements.txt', exclude=(... function check_img_size (line 379) | def check_img_size(imgsz, s=32, floor=0): function check_imshow (line 391) | def check_imshow(): function check_suffix (line 406) | def check_suffix(file='yolov5s.pt', suffix=('.pt',), msg=''): function check_yaml (line 417) | def check_yaml(file, suffix=('.yaml', '.yml')): function check_file (line 422) | def check_file(file, suffix=''): function check_font (line 447) | def check_font(font=FONT, progress=False): function check_dataset (line 457) | def check_dataset(data, autodownload=True): function check_amp (line 517) | def check_amp(model): function url2file (line 545) | def url2file(url): function download (line 551) | def download(url, dir='.', unzip=True, delete=True, curl=False, threads=... function make_divisible (line 597) | def make_divisible(x, divisor): function clean_str (line 604) | def clean_str(s): function one_cycle (line 609) | def one_cycle(y1=0.0, y2=1.0, steps=100): function colorstr (line 614) | def colorstr(*input): function labels_to_class_weights (line 640) | def labels_to_class_weights(labels, nc=80): function labels_to_image_weights (line 659) | def labels_to_image_weights(labels, nc=80, class_weights=np.ones(80)): function coco80_to_coco91_class (line 666) | def coco80_to_coco91_class(): # converts 80-index (val2014) to 91-index... function xyxy2xywh (line 678) | def xyxy2xywh(x): function xywh2xyxy (line 688) | def xywh2xyxy(x): function xywhn2xyxy (line 698) | def xywhn2xyxy(x, w=640, h=640, padw=0, padh=0): function xyxy2xywhn (line 708) | def xyxy2xywhn(x, w=640, h=640, clip=False, eps=0.0): function xyn2xy (line 720) | def xyn2xy(x, w=640, h=640, padw=0, padh=0): function segment2box (line 728) | def segment2box(segment, width=640, height=640): function segments2boxes (line 736) | def segments2boxes(segments): function resample_segments (line 745) | def resample_segments(segments, n=1000): function scale_coords (line 755) | def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None): function clip_coords (line 771) | def clip_coords(boxes, shape): function non_max_suppression (line 783) | def non_max_suppression( function strip_optimizer (line 887) | def strip_optimizer(f='best.pt', s=''): # from utils.general import *; ... function print_mutation (line 903) | def print_mutation(results, hyp, save_dir, bucket, prefix=colorstr('evol... function apply_classifier (line 949) | def apply_classifier(x, model, img, im0): function increment_path (line 984) | def increment_path(path, exist_ok=False, sep='', mkdir=False): function imread (line 1014) | def imread(path, flags=cv2.IMREAD_COLOR): function imwrite (line 1018) | def imwrite(path, im): function imshow (line 1026) | def imshow(path, im): FILE: module/detect/utils/loggers/__init__.py class Loggers (line 35) | class Loggers(): method __init__ (line 37) | def __init__(self, save_dir=None, weights=None, opt=None, hyp=None, lo... method on_train_start (line 90) | def on_train_start(self): method on_pretrain_routine_end (line 94) | def on_pretrain_routine_end(self): method on_train_batch_end (line 100) | def on_train_batch_end(self, ni, model, imgs, targets, paths, plots): method on_train_epoch_end (line 115) | def on_train_epoch_end(self, epoch): method on_val_image_end (line 120) | def on_val_image_end(self, pred, predn, path, names, im): method on_val_end (line 125) | def on_val_end(self): method on_fit_epoch_end (line 131) | def on_fit_epoch_end(self, vals, epoch, best_fitness, fi): method on_model_save (line 153) | def on_model_save(self, last, epoch, final_epoch, best_fitness, fi): method on_train_end (line 159) | def on_train_end(self, last, best, plots, epoch, results): method on_params_update (line 184) | def on_params_update(self, params): FILE: module/detect/utils/loggers/wandb/log_dataset.py function create_dataset_artifact (line 10) | def create_dataset_artifact(opt): FILE: module/detect/utils/loggers/wandb/sweep.py function sweep (line 17) | def sweep(): FILE: module/detect/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 63) | def get_run_info(run_path): function check_wandb_resume (line 72) | def check_wandb_resume(opt): function process_wandb_config_ddp_mode (line 86) | def process_wandb_config_ddp_mode(opt): class WandbLogger (line 110) | class WandbLogger(): method __init__ (line 124) | def __init__(self, opt, run_id=None, job_type='Training'): method check_and_upload_dataset (line 199) | def check_and_upload_dataset(self, opt): method setup_training (line 218) | def setup_training(self, opt): method download_dataset_artifact (line 273) | def download_dataset_artifact(self, path, alias): method download_model_artifact (line 293) | def download_model_artifact(self, opt): method log_model (line 311) | def log_model(self, path, opt, epoch, fitness_score, best_model=False): method log_dataset_artifact (line 340) | def log_dataset_artifact(self, data_file, single_cls, project, overwri... method map_val_table_path (line 402) | def map_val_table_path(self): method create_dataset_table (line 412) | def create_dataset_table(self, dataset: LoadImagesAndLabels, class_to_... method log_training_progress (line 464) | def log_training_progress(self, predn, path, names): method val_one_image (line 511) | def val_one_image(self, pred, predn, path, names, im): method log (line 539) | def log(self, log_dict): method end_epoch (line 550) | def end_epoch(self, best_result=False): method finish_run (line 587) | def finish_run(self): function all_logging_disabled (line 599) | def all_logging_disabled(highest_level=logging.CRITICAL): FILE: module/detect/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 95) | def __init__(self, model, autobalance=False): method __call__ (line 121) | def __call__(self, p, targets): # predictions, targets method build_targets (line 177) | def build_targets(self, p, targets): FILE: module/detect/utils/metrics.py function fitness (line 15) | def fitness(x): function smooth (line 21) | def smooth(y, f=0.05): function ap_per_class (line 29) | def ap_per_class(tp, conf, pred_cls, target_cls, plot=False, save_dir='.... function compute_ap (line 96) | def compute_ap(recall, precision): class ConfusionMatrix (line 124) | class ConfusionMatrix: method __init__ (line 126) | def __init__(self, nc, conf=0.25, iou_thres=0.45): method process_batch (line 132) | def process_batch(self, detections, labels): method matrix (line 172) | def matrix(self): method tp_fp (line 175) | def tp_fp(self): method plot (line 181) | def plot(self, normalize=True, save_dir='', names=()): method print (line 211) | def print(self): function bbox_iou (line 216) | def bbox_iou(box1, box2, xywh=True, GIoU=False, DIoU=False, CIoU=False, ... function box_area (line 257) | def box_area(box): function box_iou (line 262) | def box_iou(box1, box2, eps=1e-7): function bbox_ioa (line 283) | def bbox_ioa(box1, box2, eps=1e-7): function wh_iou (line 305) | def wh_iou(wh1, wh2, eps=1e-7): function plot_pr_curve (line 316) | def plot_pr_curve(px, py, ap, save_dir=Path('pr_curve.png'), names=()): function plot_mc_curve (line 337) | def plot_mc_curve(px, py, save_dir=Path('mc_curve.png'), names=(), xlabe... FILE: module/detect/utils/plots.py class Colors (line 30) | class Colors: method __init__ (line 32) | def __init__(self): method __call__ (line 39) | def __call__(self, i, bgr=False): method hex2rgb (line 44) | def hex2rgb(h): # rgb order (PIL) function check_pil_font (line 51) | def check_pil_font(font=FONT, size=10): class Annotator (line 67) | class Annotator: method __init__ (line 69) | def __init__(self, im, line_width=None, font_size=None, font='Arial.tt... method box_label (line 84) | def box_label(self, box, label='', color=(128, 128, 128), txt_color=(2... method rectangle (line 117) | def rectangle(self, xy, fill=None, outline=None, width=1): method text (line 121) | def text(self, xy, text, txt_color=(255, 255, 255)): method result (line 126) | def result(self): function feature_visualization (line 131) | def feature_visualization(x, module_type, stage, n=32, save_dir=Path('ru... function hist2d (line 159) | def hist2d(x, y, n=100): function butter_lowpass_filtfilt (line 168) | def butter_lowpass_filtfilt(data, cutoff=1500, fs=50000, order=5): function output_to_target (line 181) | def output_to_target(output): function plot_images (line 191) | def plot_images(images, targets, paths=None, fname='images.jpg', names=N... function plot_lr_scheduler (line 252) | def plot_lr_scheduler(optimizer, scheduler, epochs=300, save_dir=''): function plot_val_txt (line 269) | def plot_val_txt(): # from utils.plots import *; plot_val() function plot_targets_txt (line 286) | def plot_targets_txt(): # from utils.plots import *; plot_targets_txt() function plot_val_study (line 299) | def plot_val_study(file='', dir='', x=None): # from utils.plots import ... function plot_labels (line 350) | def plot_labels(labels, names=(), save_dir=Path('')): function plot_evolve (line 397) | def plot_evolve(evolve_csv='path/to/evolve.csv'): # from utils.plots im... function plot_results (line 424) | def plot_results(file='path/to/results.csv', dir=''): function profile_idetection (line 450) | def profile_idetection(start=0, stop=0, labels=(), save_dir=''): function save_one_box (line 481) | def save_one_box(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=10, squar... FILE: module/detect/utils/torch_utils.py function smart_DDP (line 36) | def smart_DDP(model): function torch_distributed_zero_first (line 48) | def torch_distributed_zero_first(local_rank: int): function device_count (line 57) | def device_count(): function select_device (line 67) | def select_device(device='', batch_size=0, newline=True): function time_sync (line 103) | def time_sync(): function profile (line 110) | def profile(input, ops, n=10, device=None): function is_parallel (line 164) | def is_parallel(model): function de_parallel (line 169) | def de_parallel(model): function initialize_weights (line 174) | def initialize_weights(model): function find_modules (line 186) | def find_modules(model, mclass=nn.Conv2d): function sparsity (line 191) | def sparsity(model): function prune (line 200) | def prune(model, amount=0.3): function fuse_conv_and_bn (line 211) | def fuse_conv_and_bn(conv, bn): function model_info (line 236) | def model_info(model, verbose=False, img_size=640): function scale_img (line 263) | def scale_img(img, ratio=1.0, same_shape=False, gs=32): # img(16,3,256,... function copy_attr (line 275) | def copy_attr(a, b, include=(), exclude=()): function smart_optimizer (line 284) | def smart_optimizer(model, name='Adam', lr=0.001, momentum=0.9, weight_d... class EarlyStopping (line 316) | class EarlyStopping: method __init__ (line 318) | def __init__(self, patience=30): method __call__ (line 324) | def __call__(self, epoch, fitness): class ModelEMA (line 341) | class ModelEMA: method __init__ (line 347) | def __init__(self, model, decay=0.9999, tau=2000, updates=0): method update (line 357) | def update(self, model): method update_attr (line 369) | def update_attr(self, model, include=(), exclude=('process_group', 're... FILE: module/fuse/discriminator.py class Discriminator (line 4) | class Discriminator(nn.Module): method __init__ (line 9) | def __init__(self, dim: int = 32, size: tuple[int, int] = (224, 224)): method forward (line 30) | def forward(self, x: Tensor) -> Tensor: FILE: module/fuse/generator.py class Generator (line 6) | class Generator(nn.Module): method __init__ (line 12) | def __init__(self, dim: int = 32, depth: int = 3): method forward (line 51) | def forward(self, ir: Tensor, vi: Tensor) -> Tensor: FILE: module/saliency/u2net.py class REBNCONV (line 10) | class REBNCONV(nn.Module): method __init__ (line 11) | def __init__(self, in_ch=3, out_ch=3, dirate=1): method forward (line 18) | def forward(self, x): function _upsample_like (line 26) | def _upsample_like(src, tar): class RSU7 (line 32) | class RSU7(nn.Module): # UNet07DRES(nn.Module): method __init__ (line 34) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 65) | def forward(self, x): class RSU6 (line 109) | class RSU6(nn.Module): # UNet06DRES(nn.Module): method __init__ (line 111) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 138) | def forward(self, x): class RSU5 (line 177) | class RSU5(nn.Module): # UNet05DRES(nn.Module): method __init__ (line 179) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 202) | def forward(self, x): class RSU4 (line 235) | class RSU4(nn.Module): # UNet04DRES(nn.Module): method __init__ (line 237) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 256) | def forward(self, x): class RSU4F (line 283) | class RSU4F(nn.Module): # UNet04FRES(nn.Module): method __init__ (line 285) | def __init__(self, in_ch=3, mid_ch=12, out_ch=3): method forward (line 300) | def forward(self, x): class U2NET (line 319) | class U2NET(nn.Module): method __init__ (line 321) | def __init__(self, in_ch=3, out_ch=1): method forward (line 357) | def forward(self, x): class U2NETP (line 423) | class U2NETP(nn.Module): method __init__ (line 425) | def __init__(self, in_ch=3, out_ch=1): method forward (line 461) | def forward(self, x): FILE: pipeline/detect.py class Detect (line 22) | class Detect: method __init__ (line 27) | def __init__(self, config, mode: Literal['train', 'inference'], nc: in... method load_ckpt (line 79) | def load_ckpt(self, ckpt: dict): method load_ckpt_fuse (line 83) | def load_ckpt_fuse(self, ckpt: dict): method save_ckpt (line 102) | def save_ckpt(self) -> dict: method forward (line 106) | def forward(self, imgs: Tensor) -> Tensor: method eval (line 112) | def eval(self, imgs: Tensor, targets: Tensor, stats: List, preview: bo... method inference (line 165) | def inference(self, imgs: Tensor) -> Tensor: method criterion (line 175) | def criterion(self, imgs: Tensor, targets: Tensor) -> Tuple[Tensor, Li... method preview (line 192) | def preview(imgs: Tensor, preds: Tensor, conf_th: float = 0.6): method param_groups (line 226) | def param_groups(self) -> tuple[List, List, List]: method process_batch (line 234) | def process_batch(detections, labels, iou_v): FILE: pipeline/fuse.py class Fuse (line 20) | class Fuse: method __init__ (line 25) | def __init__(self, config, mode: Literal['train', 'inference']): method load_ckpt (line 81) | def load_ckpt(self, ckpt: dict): method save_ckpt (line 101) | def save_ckpt(self) -> dict: method forward (line 107) | def forward(self, ir: Tensor, vi: Tensor) -> Tensor: method eval (line 113) | def eval(self, ir: Tensor, vi: Tensor) -> Tensor: method inference (line 119) | def inference(self, ir: Tensor, vi: Tensor) -> Tensor: method criterion_dis_t (line 125) | def criterion_dis_t(self, ir: Tensor, vi: Tensor, mk: Tensor) -> Tensor: method criterion_dis_d (line 151) | def criterion_dis_d(self, ir: Tensor, vi: Tensor, mk: Tensor) -> Tensor: method criterion_generator (line 179) | def criterion_generator(self, ir: Tensor, vi: Tensor, mk: Tensor, w1: ... method gradient (line 202) | def gradient(x: Tensor, eps: float = 1e-8) -> Tensor: method src_loss (line 208) | def src_loss(self, x: Tensor, y: Tensor) -> Tensor: method adv_loss (line 220) | def adv_loss(self, fus: Tensor, mk: Tensor) -> Tuple[Tensor, number, n... method param_groups (line 233) | def param_groups(self, key: Optional[Literal['g', 'd']] = None) -> tup... method g_params (line 247) | def g_params(self) -> tuple[List, List, List]: method d_params (line 250) | def d_params(self) -> tuple[List, List, List]: FILE: pipeline/iqa.py class IQA (line 16) | class IQA: method __init__ (line 21) | def __init__(self, url: str): method inference (line 53) | def inference(self, src: str | Path, dst: str | Path): method modality_inference (line 58) | def modality_inference(self, src: str | Path, dst: str | Path, modalit... method extractor_inference (line 78) | def extractor_inference(self, x: Tensor) -> Tensor: method _imread (line 93) | def _imread(img_p: str | Path): FILE: pipeline/saliency.py class Saliency (line 16) | class Saliency: method __init__ (line 21) | def __init__(self, url: str): method inference (line 52) | def inference(self, src: str | Path, dst: str | Path): method _imread (line 75) | def _imread(img_p: str | Path): FILE: pipeline/train.py class Train (line 23) | class Train: method __init__ (line 28) | def __init__(self, environment_probe: EnvironmentProbe, config: dict): method train_dis_target (line 71) | def train_dis_target(self, ir: Tensor, vi: Tensor, mk: Tensor) -> Tensor: method train_dis_detail (line 101) | def train_dis_detail(self, ir: Tensor, vi: Tensor, mk: Tensor) -> Tensor: method gradient (line 131) | def gradient(self, x: Tensor, eps: float = 1e-6) -> Tensor: method train_generator (line 137) | def train_generator(self, ir: Tensor, vi: Tensor, mk: Tensor, s1: Tens... method run (line 182) | def run(self): method save (line 207) | def save(self, epoch: int): FILE: scripts/infer_f.py class InferF (line 16) | class InferF: method __init__ (line 17) | def __init__(self, config: str | Path | ConfigDict, save_dir: str | Pa... method run (line 55) | def run(self): FILE: scripts/infer_fd.py class InferFD (line 17) | class InferFD: method __init__ (line 18) | def __init__(self, config: str | Path | ConfigDict, save_dir: str | Pa... method run (line 64) | def run(self): FILE: scripts/train_f.py class TrainF (line 22) | class TrainF: method __init__ (line 23) | def __init__(self, config: str | Path | ConfigDict, wandb_key: str): method run (line 101) | def run(self): method optim (line 169) | def optim(self, loss: Tensor): FILE: scripts/train_fd.py class TrainFD (line 28) | class TrainFD: method __init__ (line 29) | def __init__(self, config: str | Path | ConfigDict, wandb_key: str): method run (line 109) | def run(self): FILE: scripts/utils/smart_optimizer.py function smart_optimizer (line 8) | def smart_optimizer(config: ConfigDict, param_group: Tuple[List, List, L... FILE: tools/choose_images.py function choose_images (line 9) | def choose_images(root: str | Path, mode: str = Literal['train', 'val', ... FILE: tools/convert_to_png.py function convert_to_png (line 9) | def convert_to_png(src: str | Path, color: bool): FILE: tools/data_preview.py function data_preview (line 16) | def data_preview(img_f: str | Path, lbl_f: str | Path, dst_f: str | Path... FILE: tools/dict_to_device.py function dict_to_device (line 7) | def dict_to_device(d: Dict, device: Device) -> Dict | None: FILE: tools/environment_probe.py class EnvironmentProbe (line 7) | class EnvironmentProbe: method __init__ (line 12) | def __init__(self): method memory_status (line 21) | def memory_status(self): FILE: tools/generate_mask.py function generate_mask (line 7) | def generate_mask(url: str, src: str, dst: str): FILE: tools/scenario_reader.py function scenario_counter (line 7) | def scenario_counter(src: str | Path): function generate_meta (line 35) | def generate_meta(root: str | Path):