MCPcopy Create free account

hub / github.com/DataXujing/YOLOv8 / functions

Functions814 in github.com/DataXujing/YOLOv8

↓ 104 callersMethodinfo
> Logs model info. Args: verbose (bool): Controls verbosity.
ultralytics/yolo/engine/model.py:101
↓ 61 callersMethodappend
(self, transform)
ultralytics/yolo/data/augment.py:51
↓ 39 callersMethodto
> Sends the model to the given device. Args: device (str): device
ultralytics/yolo/engine/model.py:195
↓ 37 callersFunctioncolorstr
(*input)
ultralytics/yolo/utils/__init__.py:238
↓ 37 callersMethodinfo
Prints model information Args: verbose: if True, prints out the model information. Defaults to False imgsz: the
ultralytics/nn/tasks.py:101
↓ 31 callersMethod__init__
(self, c1, c2, n=1, shortcut=True, g=1, e=0.5)
ultralytics/nn/modules.py:169
↓ 27 callersMethodconcatenate
Concatenates a list of Boxes into a single Bboxes Arguments: boxes_list (list[Bboxes]) Returns: Bbo
ultralytics/yolo/utils/instance.py:131
↓ 22 callersMethodsave
(self, labels=True, save_dir='runs/detect/exp', exist_ok=False)
ultralytics/nn/modules.py:534
↓ 21 callersFunctioncheck_requirements
(requirements=ROOT.parent / 'requirements.txt', exclude=(), install=True, cmds='')
ultralytics/yolo/utils/checks.py:157
↓ 21 callersMethodclip
(self, w, h)
ultralytics/yolo/utils/instance.py:282
↓ 19 callersMethodload
> This function loads the weights of the model from a file Args: weights: The weights to load into the model.
ultralytics/nn/tasks.py:130
↓ 17 callersMethodtime
(self)
ultralytics/yolo/utils/ops.py:33
↓ 15 callersMethodfrom_numpy
`from_numpy` converts a numpy array to a tensor Args: x: the numpy array to convert
ultralytics/nn/autobackend.py:325
↓ 15 callersMethodupdate
Args: results: tuple(p, r, ap, f1, ap_class)
ultralytics/yolo/utils/metrics.py:489
↓ 14 callersMethodkeys
(self)
ultralytics/yolo/utils/metrics.py:511
↓ 13 callersFunctioncheck_version
Check current version against the required minimum version. Args: current (str): Current version. minimum (str): Required mi
ultralytics/yolo/utils/checks.py:72
↓ 13 callersMethodrun_callbacks
(self, event: str)
ultralytics/yolo/engine/trainer.py:162
↓ 13 callersMethodtolist
(self)
ultralytics/yolo/data/augment.py:54
↓ 10 callersFunctionde_parallel
(model)
ultralytics/yolo/utils/torch_utils.py:217
↓ 10 callersFunctionyaml_load
Load YAML data from a file. Args: file (str, optional): File name. Default is 'data.yaml'. append_filename (bool): Add the Y
ultralytics/yolo/utils/__init__.py:331
↓ 9 callersMethodconvert_bbox
(self, format)
ultralytics/yolo/utils/instance.py:189
↓ 9 callersMethodlog
> Logs the given text to given ranks process if provided, otherwise logs to all ranks. Args" text (str): text to log
ultralytics/yolo/engine/trainer.py:424
↓ 8 callersMethodplot
(self, normalize=True, save_dir='', names=())
ultralytics/yolo/utils/metrics.py:231
↓ 7 callersFunctioncheck_imgsz
Verify image size is a multiple of the given stride in each dimension. If the image size is not a multiple of the stride, update it to the ne
ultralytics/yolo/utils/checks.py:38
↓ 7 callersFunctionincrement_path
Increments a file or directory path, i.e. runs/exp --> runs/exp{sep}2, runs/exp{sep}3, ... etc. If the path exists and exist_ok is not set t
ultralytics/yolo/utils/files.py:25
↓ 7 callersMethodrectangle
(self, xy, fill=None, outline=None, width=1)
ultralytics/yolo/utils/plotting.py:120
↓ 7 callersFunctionxywh2xyxy
> It converts the bounding box from x,y,w,h to x1,y1,x2,y2 where xy1=top-left, xy2=bottom-right Args: x: the input tensor Returns
ultralytics/yolo/utils/ops.py:317
↓ 6 callersMethodadd
Args: offset (tuple | List | int): the offset for four coords.
ultralytics/yolo/utils/instance.py:113
↓ 6 callersFunctioncheck_yaml
(file, suffix=('.yaml', '.yml'))
ultralytics/yolo/utils/checks.py:227
↓ 6 callersFunctionemojis
(string='')
ultralytics/yolo/utils/__init__.py:233
↓ 6 callersMethodfromarray
(self, im)
ultralytics/yolo/utils/plotting.py:131
↓ 6 callersFunctionget_config
Load and merge configuration data from a file or dictionary. Args: config (Union[str, DictConfig]): Configuration data in the form o
ultralytics/yolo/configs/__init__.py:11
↓ 6 callersMethodlabel_loss_items
Returns a loss dict with labelled training loss items tensor
ultralytics/yolo/engine/trainer.py:454
↓ 6 callersFunctionplot_images
(images, batch_idx, cls, bboxes, masks=np.zero
ultralytics/yolo/utils/plotting.py:176
↓ 6 callersFunctionsmart_request
Makes an HTTP request using the 'requests' library, with exponential backoff retries up to a specified timeout. Args: *args: Positio
ultralytics/hub/utils.py:78
↓ 6 callersFunctionxyxy2xywh
> It takes a list of bounding boxes, and converts them from the format [x1, y1, x2, y2] to [x, y, w, h] where xy1=top-left, xy2=bottom-right
ultralytics/yolo/utils/ops.py:298
↓ 6 callersFunctionyaml_save
Save YAML data to a file. Args: file (str, optional): File name. Default is 'data.yaml'. data (dict, optional): Data to save
ultralytics/yolo/utils/__init__.py:310
↓ 5 callersMethod_run
(self, pprint=False, show=False, save=False, crop=False, render=False, labels=True, save_dir=Path(''))
ultralytics/nn/modules.py:486
↓ 5 callersFunctioncheck_file
(file, suffix='')
ultralytics/yolo/utils/checks.py:202
↓ 5 callersMethodgetReportableSeverity
tensorrt/yolov8/yolov8/logging.h:388
↓ 5 callersFunctionis_colab
Check if the current script is running inside a Google Colab notebook. Returns: bool: True if running inside a Colab notebook, False
ultralytics/yolo/utils/__init__.py:77
↓ 5 callersFunctionletterbox
(im, new_shape=(640, 640), color=(114, 114, 114), auto=True, scaleFill=False, scaleup=True, stride=32)
ultralytics/yolo/data/dataloaders/v5augmentations.py:113
↓ 5 callersMethodmean_results
Mean of results, return mp, mr, map50, map
ultralytics/yolo/utils/metrics.py:470
↓ 5 callersMethodpredict
Visualize prediction. Args: source (str): Accepts all source types accepted by yolo **kwargs : Any other arg
ultralytics/yolo/engine/model.py:114
↓ 5 callersFunctionselect_device
(device='', batch_size=0, newline=False)
ultralytics/yolo/utils/torch_utils.py:61
↓ 5 callersFunctionsplit_key
Verify and split a 'api_key[sep]model_id' string, sep is one of '.' or '_' Args: key (str): The model key to split. If not provided,
ultralytics/hub/utils.py:55
↓ 5 callersFunctiontime_sync
()
ultralytics/yolo/utils/torch_utils.py:97
↓ 5 callersFunctiontorch_distributed_zero_first
(local_rank: int)
ultralytics/yolo/utils/torch_utils.py:32
↓ 5 callersMethodtrain
> Trains the model on a given dataset. Args: **kwargs (Any): Any number of arguments representing the training configura
ultralytics/yolo/engine/model.py:169
↓ 4 callersMethod__init__
(self, dataset, pre_transform=None, p=0.0)
ultralytics/yolo/data/augment.py:186
↓ 4 callersFunctionbox_iou
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x1, y1, x2, y2) format. Arguments:
ultralytics/yolo/utils/metrics.py:45
↓ 4 callersMethodbox_label
(self, box, label='', color=(128, 128, 128), txt_color=(255, 255, 255))
ultralytics/yolo/utils/plotting.py:58
↓ 4 callersFunctioncheck_dataset
Check a classification dataset such as Imagenet. Copy code This function takes a `dataset` name as input and returns a dictionary contai
ultralytics/yolo/data/utils.py:259
↓ 4 callersMethodclass_result
class-aware result, return p[i], r[i], ap50[i], ap[i]
ultralytics/yolo/utils/metrics.py:474
↓ 4 callersMethodconvert
(self, format)
ultralytics/yolo/utils/instance.py:66
↓ 4 callersFunctioncrop_mask
> It takes a mask and a bounding box, and returns a mask that is cropped to the bounding box Args: masks: [h, w, n] tensor of masks
ultralytics/yolo/utils/ops.py:502
↓ 4 callersMethoddenormalize
(self, w, h)
ultralytics/yolo/utils/instance.py:206
↓ 4 callersMethodfliplr
(self, w)
ultralytics/yolo/utils/instance.py:270
↓ 4 callersFunctionget_flops
(model, imgsz=640)
ultralytics/yolo/utils/torch_utils.py:153
↓ 4 callersFunctionget_num_params
(model)
ultralytics/yolo/utils/torch_utils.py:145
↓ 4 callersFunctionimg2label_paths
(img_paths)
ultralytics/yolo/data/dataloaders/v5loader.py:432
↓ 4 callersMethodmul
Args: scale (tuple | List | int): the scale for four coords.
ultralytics/yolo/utils/instance.py:99
↓ 4 callersMethodprocess_batch
Return intersection-over-union (Jaccard index) of boxes. Both sets of boxes are expected to be in (x1, y1, x2, y2) format. Ar
ultralytics/yolo/utils/metrics.py:175
↓ 4 callersMethodrun_callbacks
(self, event: str)
ultralytics/yolo/engine/predictor.py:231
↓ 4 callersMethodrun_callbacks
(self, event: str)
ultralytics/yolo/engine/validator.py:178
↓ 4 callersFunctionsync_analytics
Sync analytics data if enabled in the global settings Args: cfg (DictConfig): Configuration for the task and mode. all_keys (
ultralytics/hub/utils.py:134
↓ 4 callersFunctionxywhn2xyxy
> It converts the normalized coordinates to the actual coordinates [x1, y1, x2, y2] where xy1=top-left, xy2=bottom-right Args: x: the
ultralytics/yolo/utils/ops.py:335
↓ 3 callersMethod_export_onnx
(self, prefix=colorstr('ONNX:'))
ultralytics/yolo/engine/exporter.py:275
↓ 3 callersMethod_forward_once
> Forward pass of the network Args: x: input to the model profile: if True, the time taken for each layer will b
ultralytics/nn/tasks.py:38
↓ 3 callersFunctionap_per_class
Compute the average precision, given the recall and precision curves. Source: https://github.com/rafaelpadilla/Object-Detection-Metrics. # Ar
ultralytics/yolo/utils/metrics.py:346
↓ 3 callersFunctionattempt_download
(file, repo='ultralytics/assets', release='v0.0.0')
ultralytics/yolo/utils/downloads.py:50
↓ 3 callersFunctionattempt_load_one_weight
(weight, device=None, inplace=True, fuse=False)
ultralytics/nn/tasks.py:337
↓ 3 callersMethodauthenticate
Attempt to authenticate with server
ultralytics/hub/auth.py:24
↓ 3 callersFunctionbbox_ioa
Returns the intersection over box2 area given box1, box2. Boxes are x1y1x2y2 box1: np.array of shape(nx4) box2: np.array of shape(
ultralytics/yolo/utils/metrics.py:23
↓ 3 callersMethodexport
> Export model. Args: **kwargs : Any other args accepted by the predictors. To see all args check 'configuration' sectio
ultralytics/yolo/engine/model.py:153
↓ 3 callersMethodfitness
(self)
ultralytics/yolo/utils/metrics.py:484
↓ 3 callersMethodflipud
(self, h)
ultralytics/yolo/utils/instance.py:258
↓ 3 callersMethodfuse
> It takes a model and fuses the Conv2d() and BatchNorm2d() layers into a single layer Returns: The model is being returne
ultralytics/nn/tasks.py:85
↓ 3 callersMethodget_maps
(self, nc)
ultralytics/yolo/utils/metrics.py:478
↓ 3 callersFunctionis_ascii
Check if a string is composed of only ASCII characters. Args: s (str): String to be checked. Returns: bool: True if the
ultralytics/yolo/utils/checks.py:21
↓ 3 callersMethodload_image
(self, i)
ultralytics/yolo/data/dataloaders/v5loader.py:731
↓ 3 callersFunctionmake_anchors
Generate anchors from features.
ultralytics/yolo/utils/tal.py:181
↓ 3 callersMethodnormalize
(self, w, h)
ultralytics/yolo/utils/instance.py:217
↓ 3 callersFunctionplot_mc_curve
(px, py, save_dir=Path('mc_curve.png'), names=(), xlabel='Confidence', ylabel='Metric')
ultralytics/yolo/utils/metrics.py:296
↓ 3 callersMethodprocess
(self, tp, conf, pred_cls, target_cls)
ultralytics/yolo/utils/metrics.py:505
↓ 3 callersFunctionrandom_perspective
(im, targets=(), segments=(), degrees=10,
ultralytics/yolo/data/dataloaders/v5augmentations.py:146
↓ 3 callersFunctionsave_one_box
(xyxy, im, file=Path('im.jpg'), gain=1.02, pad=10, square=False, BGR=False, save=True)
ultralytics/yolo/utils/plotting.py:157
↓ 3 callersMethodscale
this might be similar with denormalize func but without normalized sign
ultralytics/yolo/utils/instance.py:195
↓ 3 callersMethodtext
(self, xy, text, txt_color=(255, 255, 255), anchor='top')
ultralytics/yolo/utils/plotting.py:124
↓ 3 callersMethodupdate
(self, i, cap, stream)
ultralytics/yolo/data/dataloaders/v5loader.py:392
↓ 2 callersMethodLogger
tensorrt/yolov8/yolov8/logging.h:224
↓ 2 callersMethod__init__
(self, path, img_size=640, stride=32, auto=True, transforms=None, vid_stride=1)
ultralytics/yolo/data/dataloaders/v5loader.py:245
↓ 2 callersMethod__init__
(self, half=False)
ultralytics/yolo/data/dataloaders/v5augmentations.py:393
↓ 2 callersMethod__init__
(self, cfg='yolov8n.yaml', ch=3, nc=None, verbose=True)
ultralytics/nn/tasks.py:143
↓ 2 callersMethod__str__
(self)
ultralytics/nn/modules.py:571
↓ 2 callersMethod_guess_ops_from_task
(self, task)
ultralytics/yolo/engine/model.py:204
↓ 2 callersFunction_log_scalars
(scalars, step=0)
ultralytics/yolo/utils/callbacks/tensorboard.py:8
↓ 2 callersMethod_new_video
(self, path)
ultralytics/yolo/data/dataloaders/v5loader.py:324
↓ 2 callersMethod_new_video
(self, path)
ultralytics/yolo/data/dataloaders/stream_loaders.py:237
↓ 2 callersMethod_process_batch
Return correct prediction matrix Arguments: detections (array[N, 6]), x1, y1, x2, y2, conf, class labels (arr
ultralytics/yolo/v8/segment/val.py:131
next →1–100 of 814, ranked by callers