- 博客(324)
- 资源 (8)
- 收藏
- 关注
原创 tasks.py
"""模型的前向传播方法,对单个尺度进行处理。包装了 `_forward_once` 方法。Args:Returns:"""# 对训练和验证过程中的情况进行处理"""Args:x (torch.Tensor): 输入到模型的张量。profile (bool): 如果为True,打印每层的计算时间,默认为False。visualize (bool): 如果为True,保存模型的特征图,默认为False。augment (bool): 在预测过程中进行图像增强,默认为False。
2024-10-16 17:50:46
150
原创 augment.py
# Ultralytics YOLO 🚀, AGPL-3.0 licenseimport mathimport randomfrom copy import deepcopyfrom typing import Tuple, Unionimport cv2import numpy as npimport torchfrom PIL import Imagefrom ultralytics.data.utils import polygons2masks, polygons2masks
2024-10-16 17:49:09
62
原创 base.py
import globimport mathimport osimport randomfrom copy import deepcopyfrom multiprocessing.pool import ThreadPoolfrom pathlib import Pathfrom typing import Optionalimport cv2import numpy as npimport psutilfrom torch.utils.data import Datasetf
2024-10-16 17:47:55
120
原创 dataset.py
# Ultralytics YOLO 🚀, AGPL-3.0 licenseimport contextlibimport jsonfrom collections import defaultdictfrom itertools import repeatfrom multiprocessing.pool import ThreadPoolfrom pathlib import Pathimport cv2import numpy as npimport torchfrom PIL
2024-10-16 17:46:21
64
原创 utils.py
# Ultralytics YOLO 🚀, AGPL-3.0 licenseimport contextlibimport hashlibimport jsonimport osimport randomimport subprocessimport timeimport zipfilefrom multiprocessing.pool import ThreadPoolfrom pathlib import Pathfrom tarfile import is_tarfilei
2024-10-16 17:45:44
53
原创 utils.py
# Ultralytics YOLO 🚀, AGPL-3.0 licenseimport contextlibimport hashlibimport jsonimport osimport randomimport subprocessimport timeimport zipfilefrom multiprocessing.pool import ThreadPoolfrom pathlib import Pathfrom tarfile import is_tarfilei
2024-10-16 17:44:31
43
原创 exporter.py
# Ultralytics YOLO 🚀, AGPL-3.0 license"""Export a YOLOv8 PyTorch model to other formats. TensorFlow exports authored by https://github.com/zldrobit.Format | `format=argument` | Model--- | ---
2024-10-15 11:48:32
63
原创 metrics.py
# Ultralytics YOLO 🚀, AGPL-3.0 license"""Model validation metrics."""import mathimport warningsfrom pathlib import Pathimport matplotlib.pyplot as pltimport numpy as npimport torchfrom ultralytics.utils import LOGGER, SimpleClass, TryExcept, plt
2024-10-15 11:44:00
63
原创 trainer.py
”"""""""Args:"""self.args = get_cfg(cfg, overrides)# 获取配置参数self.check_resume(overrides)# 检查是否需要恢复训练状态# 初始化随机种子# Dirsself.args.name = self.save_dir.name # update name for loggers# 更新日志记录器的名称。
2024-10-15 11:40:33
58
原创 tasks.py
# Ultralytics YOLO 🚀, AGPL-3.0 licenseimport contextlibfrom copy import deepcopyfrom pathlib import Pathimport torchimport torch.nn as nnfrom ultralytics.nn.modules import ( AIFI, C1, C2, C3, C3TR, ELAN1, OBB, PSA,
2024-10-15 11:39:47
56
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人