Update README.md (#13283)

* Update README.md

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

* Auto-format by https://ultralytics.com/actions

---------

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn JocherandUltralyticsAssistant authored and GitHub committed 2024-08-26 02:37:25 +02:00
1 parent 427cfc4f73
commit b40781b3e3
15 files changed
+27 -27

No files matched your search

+6 -6
View File
@@ -28,7 +28,7 @@ def process_mask_upsample(protos, masks_in, bboxes, shape):
protos: [mask_dim, mask_h, mask_w]
masks_in: [n, mask_dim], n is number of masks after nms
bboxes: [n, 4], n is number of masks after nms
shape: input_image_size, (h, w)
shape: input_image_size, (h, w).
return: h, w, n
"""
@@ -45,7 +45,7 @@ def process_mask(protos, masks_in, bboxes, shape, upsample=False):
proto_out: [mask_dim, mask_h, mask_w]
out_masks: [n, mask_dim], n is number of masks after nms
bboxes: [n, 4], n is number of masks after nms
shape:input_image_size, (h, w)
shape:input_image_size, (h, w).
return: h, w, n
"""
@@ -71,7 +71,7 @@ def process_mask_native(protos, masks_in, bboxes, shape):
protos: [mask_dim, mask_h, mask_w]
masks_in: [n, mask_dim], n is number of masks after nms
bboxes: [n, 4], n is number of masks after nms
shape: input_image_size, (h, w)
shape: input_image_size, (h, w).
return: h, w, n
"""
@@ -92,7 +92,7 @@ def scale_image(im1_shape, masks, im0_shape, ratio_pad=None):
"""
img1_shape: model input shape, [h, w]
img0_shape: origin pic shape, [h, w, 3]
masks: [h, w, num]
masks: [h, w, num].
"""
# Rescale coordinates (xyxy) from im1_shape to im0_shape
if ratio_pad is None: # calculate from im0_shape
@@ -120,7 +120,7 @@ def mask_iou(mask1, mask2, eps=1e-7):
"""
mask1: [N, n] m1 means number of predicted objects
mask2: [M, n] m2 means number of gt objects
Note: n means image_w x image_h
Note: n means image_w x image_h.
return: masks iou, [N, M]
"""
@@ -133,7 +133,7 @@ def masks_iou(mask1, mask2, eps=1e-7):
"""
mask1: [N, n] m1 means number of predicted objects
mask2: [N, n] m2 means number of gt objects
Note: n means image_w x image_h
Note: n means image_w x image_h.
return: masks iou, (N, )
"""