IT评测·应用市场-qidao123.com
标题:
YOLOv8-ultralytics-8.2.103部门代码阅读笔记-ops.py
[打印本页]
作者:
石小疯
时间:
2024-12-3 00:19
标题:
YOLOv8-ultralytics-8.2.103部门代码阅读笔记-ops.py
ops.py
ultralytics\utils\ops.py
目次
ops.py
1.所需的库和模块
2.class Profile(contextlib.ContextDecorator):
3.def segment2box(segment, width=640, height=640):
4.def scale_boxes(img1_shape, boxes, img0_shape, ratio_pad=None, padding=True, xywh=False):
5.def make_divisible(x, divisor):
6.def nms_rotated(boxes, scores, threshold=0.45):
7.def non_max_suppression(prediction, conf_thres=0.25, iou_thres=0.45, classes=None, agnostic=False, multi_label=False, labels=(), max_det=300, nc=0, max_time_img=0.05, max_nms=30000, max_wh=7680, in_place=True, rotated=False,):
8.def clip_boxes(boxes, shape):
9.def clip_coords(coords, shape):
10.def scale_image(masks, im0_shape, ratio_pad=None):
11.def xyxy2xywh(x):
12.def xywh2xyxy(x):
13.def xywhn2xyxy(x, w=640, h=640, padw=0, padh=0):
14.def xyxy2xywhn(x, w=640, h=640, clip=False, eps=0.0):
15.def xywh2ltwh(x):
16.def xyxy2ltwh(x):
17.def ltwh2xywh(x):
18.def xyxyxyxy2xywhr(x):
19.def xywhr2xyxyxyxy(x):
20.def ltwh2xyxy(x):
21.def segments2boxes(segments):
22.def resample_segments(segments, n=1000):
23.def crop_mask(masks, boxes):
24.def process_mask(protos, masks_in, bboxes, shape, upsample=False):
25.def process_mask_native(protos, masks_in, bboxes, shape):
26.def scale_masks(masks, shape, padding=True):
27.def scale_coords(img1_shape, coords, img0_shape, ratio_pad=None, normalize=False, padding=True):
28.def regularize_rboxes(rboxes):
29.def masks2segments(masks, strategy="largest"):
30.def convert_torch2numpy_batch(batch: torch.Tensor) -> np.ndarray:
31.def clean_str(s):
1.所需的库和模块
[code]# Ultralytics YOLO
欢迎光临 IT评测·应用市场-qidao123.com (https://dis.qidao123.com/)
Powered by Discuz! X3.4