mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
ultralytics 8.0.184
https://yolovision.ultralytics.com #YV23 (#5004)
This commit is contained in:
parent
3223e71fea
commit
fa826db45f
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -52,7 +52,7 @@ body:
|
||||
label: Environment
|
||||
description: Please specify the software and hardware you used to produce the bug.
|
||||
placeholder: |
|
||||
Paste output of `yolo checks` or `ultralytics.checks()` commands:
|
||||
Paste output of `yolo checks` or `ultralytics.checks()` command, i.e.:
|
||||
```
|
||||
Ultralytics YOLOv8.0.181 🚀 Python-3.11.2 torch-2.0.1 CPU (Apple M2)
|
||||
Setup complete ✅ (8 CPUs, 16.0 GB RAM, 266.5/460.4 GB disk)
|
||||
|
2
.github/workflows/docker.yaml
vendored
2
.github/workflows/docker.yaml
vendored
@ -121,7 +121,7 @@ jobs:
|
||||
- name: Run Benchmarks
|
||||
# WARNING: Dockerfile (GPU) error on TF.js export 'module 'numpy' has no attribute 'object'.
|
||||
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
|
||||
run: docker run ultralytics/ultralytics:${{ matrix.tags }} yolo benchmark model=yolov8n.pt imgsz=160 verbose=0.26
|
||||
run: docker run ultralytics/ultralytics:${{ matrix.tags }} yolo benchmark model=yolov8n.pt imgsz=160 verbose=0.318
|
||||
|
||||
- name: Push Docker Image with Ultralytics version tag
|
||||
if: (github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')) && steps.check_tag.outputs.exists == 'false' && matrix.dockerfile != 'Dockerfile-conda'
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div align="center">
|
||||
<p>
|
||||
<a href="https://ultralytics.com/yolov8" target="_blank">
|
||||
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"></a>
|
||||
<a href="https://yolovision.ultralytics.com/" target="_blank">
|
||||
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/im/banner-yolo-vision-2023.png"></a>
|
||||
</p>
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<div align="center">
|
||||
<p>
|
||||
<a href="https://ultralytics.com/yolov8" target="_blank">
|
||||
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/yolov8/banner-yolov8.png"></a>
|
||||
<a href="https://yolovision.ultralytics.com/" target="_blank">
|
||||
<img width="100%" src="https://raw.githubusercontent.com/ultralytics/assets/main/im/banner-yolo-vision-2023.png"></a>
|
||||
</p>
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
@ -26,6 +26,9 @@ ADD https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n.pt /u
|
||||
RUN python3 -m pip install --upgrade pip wheel
|
||||
RUN pip install --no-cache -e . thop
|
||||
|
||||
# Creates a symbolic link to make 'python' point to 'python3'
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||
|
||||
|
||||
# Usage Examples -------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -37,6 +37,9 @@ RUN yolo export model=tmp/yolov8n.pt format=ncnn imgsz=32
|
||||
# Remove exported models
|
||||
RUN rm -rf tmp
|
||||
|
||||
# Creates a symbolic link to make 'python' point to 'python3'
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||
|
||||
|
||||
# Usage Examples -------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -189,7 +189,7 @@ Training settings for YOLO models refer to the various hyperparameters and confi
|
||||
| `project` | `None` | project name |
|
||||
| `name` | `None` | experiment name |
|
||||
| `exist_ok` | `False` | whether to overwrite existing experiment |
|
||||
| `pretrained` | `True` | (bool \| str) whether to use a pretrained model (bool) or a model to load weights from (str) |
|
||||
| `pretrained` | `True` | (bool or str) whether to use a pretrained model (bool) or a model to load weights from (str) |
|
||||
| `optimizer` | `'auto'` | optimizer to use, choices=[SGD, Adam, Adamax, AdamW, NAdam, RAdam, RMSProp, auto] |
|
||||
| `verbose` | `False` | whether to print verbose output |
|
||||
| `seed` | `0` | random seed for reproducibility |
|
||||
@ -202,7 +202,7 @@ Training settings for YOLO models refer to the various hyperparameters and confi
|
||||
| `amp` | `True` | Automatic Mixed Precision (AMP) training, choices=[True, False] |
|
||||
| `fraction` | `1.0` | dataset fraction to train on (default is 1.0, all images in train set) |
|
||||
| `profile` | `False` | profile ONNX and TensorRT speeds during training for loggers |
|
||||
| `freeze` | `None` | (int \| list, optional) freeze first n layers, or freeze list of layer indices during training |
|
||||
| `freeze` | `None` | (int or list, optional) freeze first n layers, or freeze list of layer indices during training |
|
||||
| `lr0` | `0.01` | initial learning rate (i.e. SGD=1E-2, Adam=1E-3) |
|
||||
| `lrf` | `0.01` | final learning rate (lr0 * lrf) |
|
||||
| `momentum` | `0.937` | SGD momentum/Adam beta1 |
|
||||
|
@ -88,7 +88,7 @@ The training settings for YOLO models encompass various hyperparameters and conf
|
||||
| `project` | `None` | project name |
|
||||
| `name` | `None` | experiment name |
|
||||
| `exist_ok` | `False` | whether to overwrite existing experiment |
|
||||
| `pretrained` | `True` | (bool \| str) whether to use a pretrained model (bool) or a model to load weights from (str) |
|
||||
| `pretrained` | `True` | (bool or str) whether to use a pretrained model (bool) or a model to load weights from (str) |
|
||||
| `optimizer` | `'auto'` | optimizer to use, choices=[SGD, Adam, Adamax, AdamW, NAdam, RAdam, RMSProp, auto] |
|
||||
| `verbose` | `False` | whether to print verbose output |
|
||||
| `seed` | `0` | random seed for reproducibility |
|
||||
@ -101,7 +101,7 @@ The training settings for YOLO models encompass various hyperparameters and conf
|
||||
| `amp` | `True` | Automatic Mixed Precision (AMP) training, choices=[True, False] |
|
||||
| `fraction` | `1.0` | dataset fraction to train on (default is 1.0, all images in train set) |
|
||||
| `profile` | `False` | profile ONNX and TensorRT speeds during training for loggers |
|
||||
| `freeze` | `None` | (int \| list, optional) freeze first n layers, or freeze list of layer indices during training |
|
||||
| `freeze` | `None` | (int or list, optional) freeze first n layers, or freeze list of layer indices during training |
|
||||
| `lr0` | `0.01` | initial learning rate (i.e. SGD=1E-2, Adam=1E-3) |
|
||||
| `lrf` | `0.01` | final learning rate (lr0 * lrf) |
|
||||
| `momentum` | `0.937` | SGD momentum/Adam beta1 |
|
||||
|
@ -49,20 +49,25 @@ def parse_requirements(file_path=ROOT.parent / 'requirements.txt'):
|
||||
return requirements
|
||||
|
||||
|
||||
def parse_version(v='0.0.0') -> tuple:
|
||||
def parse_version(version='0.0.0') -> tuple:
|
||||
"""
|
||||
Convert a version string to a tuple of integers, also returning any extra non-numeric string attached to the version.
|
||||
Convert a version string to a tuple of integers, ignoring any extra non-numeric string attached to the version.
|
||||
This function replaces deprecated 'pkg_resources.parse_version(v)'
|
||||
|
||||
Args:
|
||||
v (str): Version string, i.e. '2.0.1+cpu'
|
||||
version (str): Version string, i.e. '2.0.1+cpu'
|
||||
|
||||
Returns:
|
||||
(tuple): Tuple of integers representing the numeric part of the version and the extra string, i.e. (2, 0, 1)
|
||||
"""
|
||||
correct = [True if x == '.' else x.isdigit() for x in v] # first non-number index
|
||||
if False in correct:
|
||||
v = v[:correct.index(False)]
|
||||
try:
|
||||
correct = [True if x == '.' else x.isdigit() for x in version] # first non-number index
|
||||
v = version[:correct.index(False)] if False in correct else version
|
||||
return tuple(map(int, v.split('.'))) # '2.0.1+cpu' -> (2, 0, 1)
|
||||
except Exception as e:
|
||||
LOGGER.warning(f'WARNING ⚠️ failure for parse_version({version}), reverting to deprecated pkg_resources: {e}')
|
||||
import pkg_resources
|
||||
return pkg_resources.parse_version(version).release
|
||||
|
||||
|
||||
def is_ascii(s) -> bool:
|
||||
@ -161,22 +166,16 @@ def check_version(current: str = '0.0.0',
|
||||
# check if current version is between 20.04 (inclusive) and 22.04 (exclusive)
|
||||
check_version(current='21.10', required='>20.04,<22.04')
|
||||
"""
|
||||
if not required:
|
||||
if not (current and required): # if any inputs missing
|
||||
LOGGER.warning(f'WARNING ⚠️ invalid check_version({current}, {required}) requested, please check values.')
|
||||
return True # in case required is '' or None
|
||||
|
||||
# import pkg_resources as pkg
|
||||
# current = pkg.parse_version(current)
|
||||
current = parse_version(current) # '1.2.3' -> (1, 2, 3)
|
||||
|
||||
constraints = re.findall(r'([<>!=]{1,2}\s*\d+\.\d+)', required) or [f'>={required}']
|
||||
|
||||
result = True
|
||||
for constraint in constraints:
|
||||
op, v = re.match(r'([<>!=]{1,2})\s*(\d+\.\d+)', constraint).groups()
|
||||
|
||||
# v = pkg.parse_version(v)
|
||||
v = parse_version(v) # '1.2.3' -> (1, 2, 3)
|
||||
|
||||
if op == '==' and current != v:
|
||||
result = False
|
||||
elif op == '!=' and current == v:
|
||||
|
Loading…
x
Reference in New Issue
Block a user