|
|
|
|
|
|
|
|
segments2boxes, xyn2xy, xywh2xyxy, xywhn2xyxy, xyxy2xywhn) |
|
|
segments2boxes, xyn2xy, xywh2xyxy, xywhn2xyxy, xyxy2xywhn) |
|
|
from utils.torch_utils import torch_distributed_zero_first |
|
|
from utils.torch_utils import torch_distributed_zero_first |
|
|
|
|
|
|
|
|
|
|
|
# Remap |
|
|
|
|
|
cv2.imread = lambda x: cv2.imdecode(np.fromfile(x, np.uint8), cv2.IMREAD_COLOR) # for Chinese filenames |
|
|
|
|
|
|
|
|
# Parameters |
|
|
# Parameters |
|
|
HELP_URL = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data' |
|
|
HELP_URL = 'https://github.com/ultralytics/yolov5/wiki/Train-Custom-Data' |
|
|
IMG_FORMATS = 'bmp', 'dng', 'jpeg', 'jpg', 'mpo', 'png', 'tif', 'tiff', 'webp' # include image suffixes |
|
|
IMG_FORMATS = 'bmp', 'dng', 'jpeg', 'jpg', 'mpo', 'png', 'tif', 'tiff', 'webp' # include image suffixes |