mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 13:34:23 +08:00
update README
This commit is contained in:
parent
8d9f45a955
commit
742c7151b5
96
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
96
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@ -1,96 +0,0 @@
|
||||
name: 🐛 Bug Report
|
||||
# title: " "
|
||||
description: Problems with YOLOv8
|
||||
labels: [bug, triage]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for submitting a YOLOv8 🐛 Bug Report!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Search before asking
|
||||
description: >
|
||||
Please search the Ultralytics [Docs](https://docs.ultralytics.com) and [issues](https://github.com/ultralytics/ultralytics/issues) to see if a similar bug report already exists.
|
||||
options:
|
||||
- label: >
|
||||
I have searched the YOLOv8 [issues](https://github.com/ultralytics/ultralytics/issues) and found no similar bug report.
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: YOLOv8 Component
|
||||
description: |
|
||||
Please select the part of YOLOv8 where you found the bug.
|
||||
multiple: true
|
||||
options:
|
||||
- "Install"
|
||||
- "Train"
|
||||
- "Val"
|
||||
- "Predict"
|
||||
- "Export"
|
||||
- "Multi-GPU"
|
||||
- "Augmentation"
|
||||
- "Hyperparameter Tuning"
|
||||
- "Integrations"
|
||||
- "Other"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Bug
|
||||
description: Provide console output with error messages and/or screenshots of the bug.
|
||||
placeholder: |
|
||||
💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Environment
|
||||
description: Please specify the software and hardware you used to produce the bug.
|
||||
placeholder: |
|
||||
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)
|
||||
|
||||
OS macOS-13.5.2
|
||||
Environment Jupyter
|
||||
Python 3.11.2
|
||||
Install git
|
||||
RAM 16.00 GB
|
||||
CPU Apple M2
|
||||
CUDA None
|
||||
```
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Minimal Reproducible Example
|
||||
description: >
|
||||
When asking a question, people will be better able to provide help if you provide code that they can easily understand and use to **reproduce** the problem.
|
||||
This is referred to by community members as creating a [minimal reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/).
|
||||
placeholder: |
|
||||
```
|
||||
# Code to reproduce your issue here
|
||||
```
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional
|
||||
description: Anything else you would like to share?
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Are you willing to submit a PR?
|
||||
description: >
|
||||
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/ultralytics/pulls) (PR) to help improve YOLOv8 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
||||
See the YOLOv8 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
||||
options:
|
||||
- label: Yes I'd like to help by submitting a PR!
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
11
.github/ISSUE_TEMPLATE/config.yml
vendored
@ -1,11 +0,0 @@
|
||||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: 📄 Docs
|
||||
url: https://docs.ultralytics.com/
|
||||
about: Full Ultralytics YOLOv8 Documentation
|
||||
- name: 💬 Forum
|
||||
url: https://community.ultralytics.com/
|
||||
about: Ask on Ultralytics Community Forum
|
||||
- name: 🎧 Discord
|
||||
url: https://ultralytics.com/discord
|
||||
about: Ask on Ultralytics Discord
|
50
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
50
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
@ -1,50 +0,0 @@
|
||||
name: 🚀 Feature Request
|
||||
description: Suggest a YOLOv8 idea
|
||||
# title: " "
|
||||
labels: [enhancement]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for submitting a YOLOv8 🚀 Feature Request!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Search before asking
|
||||
description: >
|
||||
Please search the Ultralytics [Docs](https://docs.ultralytics.com) and [issues](https://github.com/ultralytics/ultralytics/issues) to see if a similar feature request already exists.
|
||||
options:
|
||||
- label: >
|
||||
I have searched the YOLOv8 [issues](https://github.com/ultralytics/ultralytics/issues) and found no similar feature requests.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
description: A short description of your feature.
|
||||
placeholder: |
|
||||
What new feature would you like to see in YOLOv8?
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Use case
|
||||
description: |
|
||||
Describe the use case of your feature request. It will help us understand and prioritize the feature request.
|
||||
placeholder: |
|
||||
How would this feature be used, and who would use it?
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional
|
||||
description: Anything else you would like to share?
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Are you willing to submit a PR?
|
||||
description: >
|
||||
(Optional) We encourage you to submit a [Pull Request](https://github.com/ultralytics/ultralytics/pulls) (PR) to help improve YOLOv8 for everyone, especially if you have a good understanding of how to implement a fix or feature.
|
||||
See the YOLOv8 [Contributing Guide](https://docs.ultralytics.com/help/contributing) to get started.
|
||||
options:
|
||||
- label: Yes I'd like to help by submitting a PR!
|
33
.github/ISSUE_TEMPLATE/question.yml
vendored
33
.github/ISSUE_TEMPLATE/question.yml
vendored
@ -1,33 +0,0 @@
|
||||
name: ❓ Question
|
||||
description: Ask a YOLOv8 question
|
||||
# title: " "
|
||||
labels: [question]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for asking a YOLOv8 ❓ Question!
|
||||
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Search before asking
|
||||
description: >
|
||||
Please search the Ultralytics [Docs](https://docs.ultralytics.com), [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) to see if a similar question already exists.
|
||||
options:
|
||||
- label: >
|
||||
I have searched the YOLOv8 [issues](https://github.com/ultralytics/ultralytics/issues) and [discussions](https://github.com/ultralytics/ultralytics/discussions) and found no similar questions.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Question
|
||||
description: What is your question?
|
||||
placeholder: |
|
||||
💡 ProTip! Include as much information as possible (screenshots, logs, tracebacks etc.) to receive the most helpful response.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional
|
||||
description: Anything else you would like to share?
|
27
.github/dependabot.yml
vendored
27
.github/dependabot.yml
vendored
@ -1,27 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Dependabot for package version updates
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: pip
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 10
|
||||
reviewers:
|
||||
- glenn-jocher
|
||||
labels:
|
||||
- dependencies
|
||||
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/.github/workflows"
|
||||
schedule:
|
||||
interval: weekly
|
||||
time: "04:00"
|
||||
open-pull-requests-limit: 5
|
||||
reviewers:
|
||||
- glenn-jocher
|
||||
labels:
|
||||
- dependencies
|
294
.github/workflows/ci.yaml
vendored
294
.github/workflows/ci.yaml
vendored
@ -1,294 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# YOLO Continuous Integration (CI) GitHub Actions tests
|
||||
|
||||
name: Ultralytics CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # runs at 00:00 UTC every day
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
hub:
|
||||
description: "Run HUB"
|
||||
default: false
|
||||
type: boolean
|
||||
benchmarks:
|
||||
description: "Run Benchmarks"
|
||||
default: false
|
||||
type: boolean
|
||||
tests:
|
||||
description: "Run Tests"
|
||||
default: false
|
||||
type: boolean
|
||||
gpu:
|
||||
description: "Run GPU"
|
||||
default: false
|
||||
type: boolean
|
||||
conda:
|
||||
description: "Run Conda"
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
HUB:
|
||||
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.hub == 'true'))
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "pip" # caching pip dependencies
|
||||
- name: Install requirements
|
||||
shell: bash # for Windows compatibility
|
||||
run: |
|
||||
python -m pip install --upgrade pip wheel
|
||||
pip install -e . --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
- name: Check environment
|
||||
run: |
|
||||
yolo checks
|
||||
pip list
|
||||
- name: Test HUB training
|
||||
shell: python
|
||||
env:
|
||||
API_KEY: ${{ secrets.ULTRALYTICS_HUB_API_KEY }}
|
||||
MODEL_ID: ${{ secrets.ULTRALYTICS_HUB_MODEL_ID }}
|
||||
run: |
|
||||
import os
|
||||
from ultralytics import YOLO, hub
|
||||
api_key, model_id = os.environ['API_KEY'], os.environ['MODEL_ID']
|
||||
hub.login(api_key)
|
||||
hub.reset_model(model_id)
|
||||
model = YOLO('https://hub.ultralytics.com/models/' + model_id)
|
||||
model.train()
|
||||
- name: Test HUB inference API
|
||||
shell: python
|
||||
env:
|
||||
API_KEY: ${{ secrets.ULTRALYTICS_HUB_API_KEY }}
|
||||
MODEL_ID: ${{ secrets.ULTRALYTICS_HUB_MODEL_ID }}
|
||||
run: |
|
||||
import os
|
||||
import requests
|
||||
import json
|
||||
api_key, model_id = os.environ['API_KEY'], os.environ['MODEL_ID']
|
||||
url = f"https://api.ultralytics.com/v1/predict/{model_id}"
|
||||
headers = {"x-api-key": api_key}
|
||||
data = {"size": 320, "confidence": 0.25, "iou": 0.45}
|
||||
with open("ultralytics/assets/zidane.jpg", "rb") as f:
|
||||
response = requests.post(url, headers=headers, data=data, files={"image": f})
|
||||
assert response.status_code == 200, f'Status code {response.status_code}, Reason {response.reason}'
|
||||
print(json.dumps(response.json(), indent=2))
|
||||
|
||||
Benchmarks:
|
||||
if: github.event_name != 'workflow_dispatch' || github.event.inputs.benchmarks == 'true'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-14]
|
||||
python-version: ["3.11"]
|
||||
model: [yolov8n]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "pip" # caching pip dependencies
|
||||
- name: Install requirements
|
||||
shell: bash # for Windows compatibility
|
||||
run: |
|
||||
python -m pip install --upgrade pip wheel
|
||||
pip install -e ".[export]" "coverage[toml]" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
# yolo export format=tflite imgsz=32 || true
|
||||
- name: Check environment
|
||||
run: |
|
||||
yolo checks
|
||||
pip list
|
||||
- name: Benchmark YOLOWorld DetectionModel
|
||||
shell: bash
|
||||
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/yolov8s-worldv2.pt' imgsz=160 verbose=0.318
|
||||
- name: Benchmark SegmentationModel
|
||||
shell: bash
|
||||
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-seg.pt' imgsz=160 verbose=0.281
|
||||
- name: Benchmark ClassificationModel
|
||||
shell: bash
|
||||
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-cls.pt' imgsz=160 verbose=0.166
|
||||
- name: Benchmark PoseModel
|
||||
shell: bash
|
||||
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-pose.pt' imgsz=160 verbose=0.183
|
||||
- name: Benchmark OBBModel
|
||||
shell: bash
|
||||
run: coverage run -a --source=ultralytics -m ultralytics.cfg.__init__ benchmark model='path with spaces/${{ matrix.model }}-obb.pt' imgsz=160 verbose=0.472
|
||||
- name: Merge Coverage Reports
|
||||
run: |
|
||||
coverage xml -o coverage-benchmarks.xml
|
||||
- name: Upload Coverage Reports to CodeCov
|
||||
if: github.repository == 'ultralytics/ultralytics'
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
flags: Benchmarks
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
- name: Benchmark Summary
|
||||
run: |
|
||||
cat benchmarks.log
|
||||
echo "$(cat benchmarks.log)" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
Tests:
|
||||
if: github.event_name != 'workflow_dispatch' || github.event.inputs.tests == 'true'
|
||||
timeout-minutes: 60
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-14]
|
||||
python-version: ["3.11"]
|
||||
torch: [latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
python-version: "3.8" # torch 1.8.0 requires python >=3.6, <=3.8
|
||||
torch: "1.8.0" # min torch version CI https://pypi.org/project/torchvision/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "pip" # caching pip dependencies
|
||||
- name: Install requirements
|
||||
shell: bash # for Windows compatibility
|
||||
run: |
|
||||
# CoreML must be installed before export due to protobuf error from AutoInstall
|
||||
python -m pip install --upgrade pip wheel
|
||||
torch=""
|
||||
if [ "${{ matrix.torch }}" == "1.8.0" ]; then
|
||||
torch="torch==1.8.0 torchvision==0.9.0"
|
||||
fi
|
||||
pip install -e . $torch pytest-cov "coremltools>=7.0; platform_system != 'Windows' and python_version <= '3.11'" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
- name: Check environment
|
||||
run: |
|
||||
yolo checks
|
||||
pip list
|
||||
- name: Pytest tests
|
||||
shell: bash # for Windows compatibility
|
||||
run: |
|
||||
slow=""
|
||||
if [[ "${{ github.event_name }}" == "schedule" ]] || [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
# WARNING bug in ray>=2.10.0
|
||||
pip install mlflow pycocotools "ray[tune]<=2.9.3"
|
||||
slow="--slow"
|
||||
fi
|
||||
pytest $slow --cov=ultralytics/ --cov-report xml tests/
|
||||
- name: Upload Coverage Reports to CodeCov
|
||||
if: github.repository == 'ultralytics/ultralytics' # && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
flags: Tests
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
GPU:
|
||||
if: github.repository == 'ultralytics/ultralytics' && (github.event_name != 'workflow_dispatch' || github.event.inputs.gpu == 'true')
|
||||
timeout-minutes: 60
|
||||
runs-on: gpu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install requirements
|
||||
run: pip install -e .
|
||||
- name: Check environment
|
||||
run: |
|
||||
yolo checks
|
||||
pip list
|
||||
- name: Pytest tests
|
||||
run: pytest --cov=ultralytics/ --cov-report xml tests/test_cuda.py
|
||||
- name: Upload Coverage Reports to CodeCov
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
flags: GPU
|
||||
env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
Conda:
|
||||
if: github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event.inputs.conda == 'true')
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
python-version: ["3.11"]
|
||||
defaults:
|
||||
run:
|
||||
shell: bash -el {0}
|
||||
steps:
|
||||
- uses: conda-incubator/setup-miniconda@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
mamba-version: "*"
|
||||
channels: conda-forge,defaults
|
||||
channel-priority: true
|
||||
activate-environment: anaconda-client-env
|
||||
- name: Install Linux packages
|
||||
run: |
|
||||
# Fix cv2 ImportError: 'libEGL.so.1: cannot open shared object file: No such file or directory'
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libegl1 libopengl0
|
||||
- name: Install Libmamba
|
||||
run: |
|
||||
conda config --set solver libmamba
|
||||
- name: Install Ultralytics package from conda-forge
|
||||
run: |
|
||||
conda install -c pytorch -c conda-forge pytorch torchvision ultralytics openvino
|
||||
- name: Install pip packages
|
||||
run: |
|
||||
# CoreML must be installed before export due to protobuf error from AutoInstall
|
||||
pip install pytest "coremltools>=7.0; platform_system != 'Windows' and python_version <= '3.11'"
|
||||
- name: Check environment
|
||||
run: |
|
||||
conda list
|
||||
- name: Test CLI
|
||||
run: |
|
||||
yolo predict model=yolov8n.pt imgsz=320
|
||||
yolo train model=yolov8n.pt data=coco8.yaml epochs=1 imgsz=32
|
||||
yolo val model=yolov8n.pt data=coco8.yaml imgsz=32
|
||||
yolo export model=yolov8n.pt format=torchscript imgsz=160
|
||||
- name: Test Python
|
||||
run: |
|
||||
python -c "
|
||||
from ultralytics import YOLO
|
||||
model = YOLO('yolov8n.pt')
|
||||
results = model.train(data='coco8.yaml', epochs=3, imgsz=160)
|
||||
results = model.val(imgsz=160)
|
||||
results = model.predict(imgsz=160)
|
||||
results = model.export(format='onnx', imgsz=160)
|
||||
"
|
||||
- name: PyTest
|
||||
run: |
|
||||
git clone https://github.com/ultralytics/ultralytics
|
||||
pytest ultralytics/tests
|
||||
|
||||
Summary:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [HUB, Benchmarks, Tests, GPU, Conda] # Add job names that you want to check for failure
|
||||
if: always() # This ensures the job runs even if previous jobs fail
|
||||
steps:
|
||||
- name: Check for failure and notify
|
||||
if: (needs.HUB.result == 'failure' || needs.Benchmarks.result == 'failure' || needs.Tests.result == 'failure' || needs.GPU.result == 'failure' || needs.Conda.result == 'failure') && github.repository == 'ultralytics/ultralytics' && (github.event_name == 'schedule' || github.event_name == 'push')
|
||||
uses: slackapi/slack-github-action@v1.25.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
37
.github/workflows/cla.yml
vendored
37
.github/workflows/cla.yml
vendored
@ -1,37 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
name: CLA Assistant
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
pull_request_target:
|
||||
types:
|
||||
- reopened
|
||||
- opened
|
||||
- synchronize
|
||||
|
||||
jobs:
|
||||
CLA:
|
||||
if: github.repository == 'ultralytics/ultralytics'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: CLA Assistant
|
||||
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I sign the CLA') || github.event_name == 'pull_request_target'
|
||||
uses: contributor-assistant/github-action@v2.3.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# must be repository secret token
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
with:
|
||||
path-to-signatures: "signatures/version1/cla.json"
|
||||
path-to-document: "https://docs.ultralytics.com/help/CLA" # CLA document
|
||||
# branch should not be protected
|
||||
branch: "main"
|
||||
allowlist: dependabot[bot],github-actions,[pre-commit*,pre-commit*,bot*
|
||||
|
||||
remote-organization-name: ultralytics
|
||||
remote-repository-name: cla
|
||||
custom-pr-sign-comment: "I have read the CLA Document and I sign the CLA"
|
||||
custom-allsigned-prcomment: All Contributors have signed the CLA. ✅
|
||||
#custom-notsigned-prcomment: 'pull request comment with Introductory message to ask new contributors to sign'
|
42
.github/workflows/codeql.yaml
vendored
42
.github/workflows/codeql.yaml
vendored
@ -1,42 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 1 * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ${{ 'ubuntu-latest' }}
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["python"]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
159
.github/workflows/docker.yaml
vendored
159
.github/workflows/docker.yaml
vendored
@ -1,159 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Builds ultralytics/ultralytics:latest images on DockerHub https://hub.docker.com/r/ultralytics
|
||||
|
||||
name: Publish Docker Images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths-ignore:
|
||||
- "docs/**"
|
||||
- "mkdocs.yml"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
Dockerfile:
|
||||
type: boolean
|
||||
description: Use Dockerfile
|
||||
default: true
|
||||
Dockerfile-cpu:
|
||||
type: boolean
|
||||
description: Use Dockerfile-cpu
|
||||
Dockerfile-arm64:
|
||||
type: boolean
|
||||
description: Use Dockerfile-arm64
|
||||
Dockerfile-jetson:
|
||||
type: boolean
|
||||
description: Use Dockerfile-jetson
|
||||
Dockerfile-python:
|
||||
type: boolean
|
||||
description: Use Dockerfile-python
|
||||
Dockerfile-conda:
|
||||
type: boolean
|
||||
description: Use Dockerfile-conda
|
||||
push:
|
||||
type: boolean
|
||||
description: Push images to Docker Hub
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
if: github.repository == 'ultralytics/ultralytics'
|
||||
name: Push
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 6
|
||||
matrix:
|
||||
include:
|
||||
- dockerfile: "Dockerfile"
|
||||
tags: "latest"
|
||||
platforms: "linux/amd64"
|
||||
- dockerfile: "Dockerfile-cpu"
|
||||
tags: "latest-cpu"
|
||||
platforms: "linux/amd64"
|
||||
- dockerfile: "Dockerfile-arm64"
|
||||
tags: "latest-arm64"
|
||||
platforms: "linux/arm64"
|
||||
- dockerfile: "Dockerfile-jetson"
|
||||
tags: "latest-jetson"
|
||||
platforms: "linux/arm64"
|
||||
- dockerfile: "Dockerfile-python"
|
||||
tags: "latest-python"
|
||||
platforms: "linux/amd64"
|
||||
# - dockerfile: "Dockerfile-conda"
|
||||
# tags: "latest-conda"
|
||||
# platforms: "linux/amd64"
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # copy full .git directory to access full git history in Docker images
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Retrieve Ultralytics version
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=$(grep "^__version__ =" ultralytics/__init__.py | awk -F'"' '{print $2}')
|
||||
echo "Retrieved Ultralytics version: $VERSION"
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
VERSION_TAG=$(echo "${{ matrix.tags }}" | sed "s/latest/${VERSION}/")
|
||||
echo "Intended version tag: $VERSION_TAG"
|
||||
echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check if version tag exists on DockerHub
|
||||
id: check_tag
|
||||
run: |
|
||||
RESPONSE=$(curl -s https://hub.docker.com/v2/repositories/ultralytics/ultralytics/tags/$VERSION_TAG)
|
||||
MESSAGE=$(echo $RESPONSE | jq -r '.message')
|
||||
if [[ "$MESSAGE" == "null" ]]; then
|
||||
echo "Tag $VERSION_TAG already exists on DockerHub."
|
||||
echo "exists=true" >> $GITHUB_OUTPUT
|
||||
elif [[ "$MESSAGE" == *"404"* ]]; then
|
||||
echo "Tag $VERSION_TAG does not exist on DockerHub."
|
||||
echo "exists=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Unexpected response from DockerHub. Please check manually."
|
||||
echo "exists=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
env:
|
||||
VERSION_TAG: ${{ steps.get_version.outputs.version_tag }}
|
||||
|
||||
- name: Build Image
|
||||
if: github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true'
|
||||
uses: nick-invision/retry@v3
|
||||
with:
|
||||
timeout_minutes: 60
|
||||
retry_wait_seconds: 30
|
||||
max_attempts: 2 # retry once
|
||||
command: |
|
||||
docker build \
|
||||
--platform ${{ matrix.platforms }} \
|
||||
-f docker/${{ matrix.dockerfile }} \
|
||||
-t ultralytics/ultralytics:${{ matrix.tags }} \
|
||||
-t ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }} \
|
||||
.
|
||||
|
||||
- name: Run Tests
|
||||
if: (github.event_name == 'push' || github.event.inputs[matrix.dockerfile] == 'true') && matrix.platforms == 'linux/amd64' && matrix.dockerfile != 'Dockerfile-conda' # arm64 images not supported on GitHub CI runners
|
||||
run: docker run ultralytics/ultralytics:${{ matrix.tags }} /bin/bash -c "pip install pytest && pytest tests"
|
||||
|
||||
- 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.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'
|
||||
run: |
|
||||
docker push ultralytics/ultralytics:${{ steps.get_version.outputs.version_tag }}
|
||||
|
||||
- name: Push Docker Image with latest tag
|
||||
if: github.event_name == 'push' || (github.event.inputs[matrix.dockerfile] == 'true' && github.event.inputs.push == 'true')
|
||||
run: |
|
||||
docker push ultralytics/ultralytics:${{ matrix.tags }}
|
||||
if [[ "${{ matrix.tags }}" == "latest" ]]; then
|
||||
t=ultralytics/ultralytics:latest-runner
|
||||
docker build -f docker/Dockerfile-runner -t $t .
|
||||
docker push $t
|
||||
fi
|
||||
|
||||
- name: Notify on failure
|
||||
if: github.event_name == 'push' && failure() # do not notify on cancelled() as cancelling is performed by hand
|
||||
uses: slackapi/slack-github-action@v1.25.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
28
.github/workflows/format.yml
vendored
28
.github/workflows/format.yml
vendored
@ -1,28 +0,0 @@
|
||||
# Ultralytics 🚀 - AGPL-3.0 license
|
||||
# Ultralytics Actions https://github.com/ultralytics/actions
|
||||
# This workflow automatically formats code and documentation in PRs to official Ultralytics standards
|
||||
|
||||
name: Ultralytics Actions
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request_target:
|
||||
branches: [main]
|
||||
types: [opened, closed, synchronize]
|
||||
|
||||
jobs:
|
||||
format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Run Ultralytics Formatting
|
||||
uses: ultralytics/actions@main
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, do not modify
|
||||
python: true # format Python code and docstrings
|
||||
markdown: true # format Markdown and YAML
|
||||
spelling: true # check spelling
|
||||
links: false # check broken links
|
||||
summary: true # print PR summary with GPT4 (requires 'openai_api_key' or 'openai_azure_api_key' and 'openai_azure_endpoint')
|
||||
openai_azure_api_key: ${{ secrets.OPENAI_AZURE_API_KEY }}
|
||||
openai_azure_endpoint: ${{ secrets.OPENAI_AZURE_ENDPOINT }}
|
58
.github/workflows/greetings.yml
vendored
58
.github/workflows/greetings.yml
vendored
@ -1,58 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
name: Greetings
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
pr-message: |
|
||||
👋 Hello @${{ github.actor }}, thank you for submitting an Ultralytics YOLOv8 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:
|
||||
|
||||
- ✅ Verify your PR is **up-to-date** with `ultralytics/ultralytics` `main` branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running `git pull` and `git merge main` locally.
|
||||
- ✅ Verify all YOLOv8 Continuous Integration (CI) **checks are passing**.
|
||||
- ✅ Update YOLOv8 [Docs](https://docs.ultralytics.com) for any new or updated features.
|
||||
- ✅ Reduce changes to the absolute **minimum** required for your bug fix or feature addition. _"It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is."_ — Bruce Lee
|
||||
|
||||
See our [Contributing Guide](https://docs.ultralytics.com/help/contributing) for details and let us know if you have any questions!
|
||||
|
||||
issue-message: |
|
||||
👋 Hello @${{ github.actor }}, thank you for your interest in Ultralytics YOLOv8 🚀! We recommend a visit to the [Docs](https://docs.ultralytics.com) for new users where you can find many [Python](https://docs.ultralytics.com/usage/python/) and [CLI](https://docs.ultralytics.com/usage/cli/) usage examples and where many of the most common questions may already be answered.
|
||||
|
||||
If this is a 🐛 Bug Report, please provide a [minimum reproducible example](https://docs.ultralytics.com/help/minimum_reproducible_example/) to help us debug it.
|
||||
|
||||
If this is a custom training ❓ Question, please provide as much information as possible, including dataset image examples and training logs, and verify you are following our [Tips for Best Training Results](https://docs.ultralytics.com/yolov5/tutorials/tips_for_best_training_results/).
|
||||
|
||||
Join the vibrant [Ultralytics Discord](https://ultralytics.com/discord) 🎧 community for real-time conversations and collaborations. This platform offers a perfect space to inquire, showcase your work, and connect with fellow Ultralytics users.
|
||||
|
||||
## Install
|
||||
|
||||
Pip install the `ultralytics` package including all [requirements](https://github.com/ultralytics/ultralytics/blob/main/pyproject.toml) in a [**Python>=3.8**](https://www.python.org/) environment with [**PyTorch>=1.8**](https://pytorch.org/get-started/locally/).
|
||||
|
||||
```bash
|
||||
pip install ultralytics
|
||||
```
|
||||
|
||||
## Environments
|
||||
|
||||
YOLOv8 may be run in any of the following up-to-date verified environments (with all dependencies including [CUDA](https://developer.nvidia.com/cuda)/[CUDNN](https://developer.nvidia.com/cudnn), [Python](https://www.python.org/) and [PyTorch](https://pytorch.org/) preinstalled):
|
||||
|
||||
- **Notebooks** with free GPU: <a href="https://console.paperspace.com/github/ultralytics/ultralytics"><img src="https://assets.paperspace.io/img/gradient-badge.svg" alt="Run on Gradient"/></a> <a href="https://colab.research.google.com/github/ultralytics/ultralytics/blob/main/examples/tutorial.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"></a> <a href="https://www.kaggle.com/ultralytics/yolov8"><img src="https://kaggle.com/static/images/open-in-kaggle.svg" alt="Open In Kaggle"></a>
|
||||
- **Google Cloud** Deep Learning VM. See [GCP Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/google_cloud_quickstart_tutorial/)
|
||||
- **Amazon** Deep Learning AMI. See [AWS Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/aws_quickstart_tutorial/)
|
||||
- **Docker Image**. See [Docker Quickstart Guide](https://docs.ultralytics.com/yolov5/environments/docker_image_quickstart_tutorial/) <a href="https://hub.docker.com/r/ultralytics/ultralytics"><img src="https://img.shields.io/docker/pulls/ultralytics/ultralytics?logo=docker" alt="Docker Pulls"></a>
|
||||
|
||||
## Status
|
||||
|
||||
<a href="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule"><img src="https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml/badge.svg" alt="Ultralytics CI"></a>
|
||||
|
||||
If this badge is green, all [Ultralytics CI](https://github.com/ultralytics/ultralytics/actions/workflows/ci.yaml?query=event%3Aschedule) tests are currently passing. CI tests verify correct operation of all YOLOv8 [Modes](https://docs.ultralytics.com/modes/) and [Tasks](https://docs.ultralytics.com/tasks/) on macOS, Windows, and Ubuntu every 24 hours and on every commit.
|
90
.github/workflows/links.yml
vendored
90
.github/workflows/links.yml
vendored
@ -1,90 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Continuous Integration (CI) GitHub Actions tests broken link checker using https://github.com/lycheeverse/lychee
|
||||
# Ignores the following status codes to reduce false positives:
|
||||
# - 403(OpenVINO, 'forbidden')
|
||||
# - 429(Instagram, 'too many requests')
|
||||
# - 500(Zenodo, 'cached')
|
||||
# - 502(Zenodo, 'bad gateway')
|
||||
# - 999(LinkedIn, 'unknown status code')
|
||||
|
||||
name: Check Broken links
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # runs at 00:00 UTC every day
|
||||
|
||||
jobs:
|
||||
Links:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download and install lychee
|
||||
run: |
|
||||
LYCHEE_URL=$(curl -s https://api.github.com/repos/lycheeverse/lychee/releases/latest | grep "browser_download_url" | grep "x86_64-unknown-linux-gnu.tar.gz" | cut -d '"' -f 4)
|
||||
curl -L $LYCHEE_URL -o lychee.tar.gz
|
||||
tar xzf lychee.tar.gz
|
||||
sudo mv lychee /usr/local/bin
|
||||
|
||||
- name: Test Markdown and HTML links with retry
|
||||
uses: nick-invision/retry@v3
|
||||
with:
|
||||
timeout_minutes: 5
|
||||
retry_wait_seconds: 60
|
||||
max_attempts: 3
|
||||
command: |
|
||||
lychee \
|
||||
--scheme https \
|
||||
--timeout 60 \
|
||||
--insecure \
|
||||
--accept 403,429,500,502,999 \
|
||||
--exclude-all-private \
|
||||
--exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \
|
||||
--exclude-path docs/zh \
|
||||
--exclude-path docs/es \
|
||||
--exclude-path docs/ru \
|
||||
--exclude-path docs/pt \
|
||||
--exclude-path docs/fr \
|
||||
--exclude-path docs/de \
|
||||
--exclude-path docs/ja \
|
||||
--exclude-path docs/ko \
|
||||
--exclude-path docs/hi \
|
||||
--exclude-path docs/ar \
|
||||
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
||||
'./**/*.md' \
|
||||
'./**/*.html'
|
||||
|
||||
- name: Test Markdown, HTML, YAML, Python and Notebook links with retry
|
||||
if: github.event_name == 'workflow_dispatch'
|
||||
uses: nick-invision/retry@v3
|
||||
with:
|
||||
timeout_minutes: 5
|
||||
retry_wait_seconds: 60
|
||||
max_attempts: 3
|
||||
command: |
|
||||
lychee \
|
||||
--scheme https \
|
||||
--timeout 60 \
|
||||
--insecure \
|
||||
--accept 429,999 \
|
||||
--exclude-all-private \
|
||||
--exclude 'https?://(www\.)?(linkedin\.com|twitter\.com|instagram\.com|kaggle\.com|fonts\.gstatic\.com|url\.com)' \
|
||||
--exclude-path '**/ci.yaml' \
|
||||
--exclude-path docs/zh \
|
||||
--exclude-path docs/es \
|
||||
--exclude-path docs/ru \
|
||||
--exclude-path docs/pt \
|
||||
--exclude-path docs/fr \
|
||||
--exclude-path docs/de \
|
||||
--exclude-path docs/ja \
|
||||
--exclude-path docs/ko \
|
||||
--exclude-path docs/hi \
|
||||
--exclude-path docs/ar \
|
||||
--github-token ${{ secrets.GITHUB_TOKEN }} \
|
||||
'./**/*.md' \
|
||||
'./**/*.html' \
|
||||
'./**/*.yml' \
|
||||
'./**/*.yaml' \
|
||||
'./**/*.py' \
|
||||
'./**/*.ipynb'
|
113
.github/workflows/publish.yml
vendored
113
.github/workflows/publish.yml
vendored
@ -1,113 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
# Publish pip package to PyPI https://pypi.org/project/ultralytics/ and Docs to https://docs.ultralytics.com
|
||||
|
||||
name: Publish to PyPI and Deploy Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pypi:
|
||||
type: boolean
|
||||
description: Publish to PyPI
|
||||
docs:
|
||||
type: boolean
|
||||
description: Deploy Docs
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
if: github.repository == 'ultralytics/ultralytics' && github.actor == 'glenn-jocher'
|
||||
name: Publish
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: "0" # pulls all commits (needed correct last updated dates in Docs)
|
||||
- name: Set up Python environment
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: "pip" # caching pip dependencies
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip wheel build twine
|
||||
pip install -e ".[dev]" --extra-index-url https://download.pytorch.org/whl/cpu
|
||||
- name: Check PyPI version
|
||||
shell: python
|
||||
run: |
|
||||
import os
|
||||
import ultralytics
|
||||
from ultralytics.utils.checks import check_latest_pypi_version
|
||||
|
||||
v_local = tuple(map(int, ultralytics.__version__.split('.')))
|
||||
v_pypi = tuple(map(int, check_latest_pypi_version().split('.')))
|
||||
print(f'Local version is {v_local}')
|
||||
print(f'PyPI version is {v_pypi}')
|
||||
d = [a - b for a, b in zip(v_local, v_pypi)] # diff
|
||||
increment = (d[0] == d[1] == 0) and (0 < d[2] < 3) # only publish if patch version increments by 1 or 2
|
||||
os.system(f'echo "increment={increment}" >> $GITHUB_OUTPUT')
|
||||
os.system(f'echo "version={ultralytics.__version__}" >> $GITHUB_OUTPUT')
|
||||
if increment:
|
||||
print('Local version is higher than PyPI version. Publishing new version to PyPI ✅.')
|
||||
id: check_pypi
|
||||
- name: Publish to PyPI
|
||||
continue-on-error: true
|
||||
if: (github.event_name == 'push' || github.event.inputs.pypi == 'true') && steps.check_pypi.outputs.increment == 'True'
|
||||
env:
|
||||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
||||
run: |
|
||||
python -m build
|
||||
python -m twine upload dist/* -u __token__ -p $PYPI_TOKEN
|
||||
- name: Deploy Docs
|
||||
continue-on-error: true
|
||||
if: (github.event_name == 'push' || github.event.inputs.docs == 'true') && github.repository == 'ultralytics/ultralytics' && github.actor == 'glenn-jocher'
|
||||
env:
|
||||
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
|
||||
INDEXNOW_KEY: ${{ secrets.INDEXNOW_KEY_DOCS }}
|
||||
run: |
|
||||
export JUPYTER_PLATFORM_DIRS=1
|
||||
python docs/build_docs.py
|
||||
git config --global user.name "Glenn Jocher"
|
||||
git config --global user.email "glenn.jocher@ultralytics.com"
|
||||
git clone https://github.com/ultralytics/docs.git docs-repo
|
||||
cd docs-repo
|
||||
git checkout gh-pages || git checkout -b gh-pages
|
||||
rm -rf *
|
||||
cp -R ../site/* .
|
||||
echo "$INDEXNOW_KEY" > "$INDEXNOW_KEY.txt"
|
||||
git add .
|
||||
LATEST_HASH=$(git rev-parse --short=7 HEAD)
|
||||
git commit -m "Update Docs for 'ultralytics ${{ steps.check_pypi.outputs.version }} - $LATEST_HASH'"
|
||||
git push https://$PERSONAL_ACCESS_TOKEN@github.com/ultralytics/docs.git gh-pages
|
||||
- name: Extract PR Details
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
PR_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }})
|
||||
PR_NUMBER=${{ github.event.pull_request.number }}
|
||||
PR_TITLE=$(echo $PR_JSON | jq -r '.title')
|
||||
else
|
||||
COMMIT_SHA=${{ github.event.after }}
|
||||
PR_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/search/issues?q=repo:${{ github.repository }}+is:pr+is:merged+sha:$COMMIT_SHA")
|
||||
PR_NUMBER=$(echo $PR_JSON | jq -r '.items[0].number')
|
||||
PR_TITLE=$(echo $PR_JSON | jq -r '.items[0].title')
|
||||
fi
|
||||
echo "PR_NUMBER=$PR_NUMBER" >> $GITHUB_ENV
|
||||
echo "PR_TITLE=$PR_TITLE" >> $GITHUB_ENV
|
||||
- name: Notify on Slack (Success)
|
||||
if: success() && github.event_name == 'push' && steps.check_pypi.outputs.increment == 'True'
|
||||
uses: slackapi/slack-github-action@v1.25.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions success for ${{ github.workflow }} ✅\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* NEW 'ultralytics ${{ steps.check_pypi.outputs.version }}' pip package published 😃\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
||||
- name: Notify on Slack (Failure)
|
||||
if: failure()
|
||||
uses: slackapi/slack-github-action@v1.25.0
|
||||
with:
|
||||
payload: |
|
||||
{"text": "<!channel> GitHub Actions error for ${{ github.workflow }} ❌\n\n\n*Repository:* https://github.com/${{ github.repository }}\n*Action:* https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}\n*Author:* ${{ github.actor }}\n*Event:* ${{ github.event_name }}\n*Job Status:* ${{ job.status }}\n*Pull Request:* <https://github.com/${{ github.repository }}/pull/${{ env.PR_NUMBER }}> ${{ env.PR_TITLE }}\n"}
|
||||
env:
|
||||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_YOLO }}
|
47
.github/workflows/stale.yml
vendored
47
.github/workflows/stale.yml
vendored
@ -1,47 +0,0 @@
|
||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||
|
||||
name: Close stale issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *" # Runs at 00:00 UTC every day
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
stale-issue-message: |
|
||||
👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.
|
||||
|
||||
For additional resources and information, please see the links below:
|
||||
|
||||
- **Docs**: https://docs.ultralytics.com
|
||||
- **HUB**: https://hub.ultralytics.com
|
||||
- **Community**: https://community.ultralytics.com
|
||||
|
||||
Feel free to inform us of any other **issues** you discover or **feature requests** that come to mind in the future. Pull Requests (PRs) are also always welcomed!
|
||||
|
||||
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
|
||||
|
||||
stale-pr-message: |
|
||||
👋 Hello there! We wanted to let you know that we've decided to close this pull request due to inactivity. We appreciate the effort you put into contributing to our project, but unfortunately, not all contributions are suitable or aligned with our product roadmap.
|
||||
|
||||
We hope you understand our decision, and please don't let it discourage you from contributing to open source projects in the future. We value all of our community members and their contributions, and we encourage you to keep exploring new projects and ways to get involved.
|
||||
|
||||
For additional resources and information, please see the links below:
|
||||
|
||||
- **Docs**: https://docs.ultralytics.com
|
||||
- **HUB**: https://hub.ultralytics.com
|
||||
- **Community**: https://community.ultralytics.com
|
||||
|
||||
Thank you for your contributions to YOLO 🚀 and Vision AI ⭐
|
||||
|
||||
days-before-issue-stale: 30
|
||||
days-before-issue-close: 10
|
||||
days-before-pr-stale: 90
|
||||
days-before-pr-close: 30
|
||||
exempt-issue-labels: "documentation,tutorial,TODO"
|
||||
operations-per-run: 300 # The maximum number of operations per run, used to control rate limiting.
|
26
CITATION.cff
26
CITATION.cff
@ -1,26 +0,0 @@
|
||||
# This CITATION.cff file was generated with https://bit.ly/cffinit
|
||||
|
||||
cff-version: 1.2.0
|
||||
title: Ultralytics YOLO
|
||||
message: >-
|
||||
If you use this software, please cite it using the
|
||||
metadata from this file.
|
||||
type: software
|
||||
authors:
|
||||
- given-names: Glenn
|
||||
family-names: Jocher
|
||||
affiliation: Ultralytics
|
||||
orcid: 'https://orcid.org/0000-0001-5950-6979'
|
||||
- given-names: Ayush
|
||||
family-names: Chaurasia
|
||||
affiliation: Ultralytics
|
||||
orcid: 'https://orcid.org/0000-0002-7603-6750'
|
||||
- family-names: Qiu
|
||||
given-names: Jing
|
||||
affiliation: Ultralytics
|
||||
orcid: 'https://orcid.org/0000-0003-3783-7069'
|
||||
repository-code: 'https://github.com/ultralytics/ultralytics'
|
||||
url: 'https://ultralytics.com'
|
||||
license: AGPL-3.0
|
||||
version: 8.0.0
|
||||
date-released: '2023-01-10'
|
15
README.md
15
README.md
@ -1,4 +1,4 @@
|
||||
# [YOLOv10: Real-Time End-to-End Object Detection]()
|
||||
# [YOLOv10: Real-Time End-to-End Object Detection](https://arxiv.org/abs/2405.14458)
|
||||
|
||||
|
||||
Official PyTorch implementation of **YOLOv10**.
|
||||
@ -9,9 +9,9 @@ Official PyTorch implementation of **YOLOv10**.
|
||||
Comparisons with others in terms of latency-accuracy (left) and size-accuracy (right) trade-offs.
|
||||
</p>
|
||||
|
||||
[YOLOv10: Real-Time End-to-End Object Detection]().\
|
||||
[YOLOv10: Real-Time End-to-End Object Detection](https://arxiv.org/abs/2405.14458).\
|
||||
Ao Wang, Hui Chen, Lihao Liu, Kai Chen, Zijia Lin, Jungong Han, and Guiguang Ding\
|
||||
[[`arXiv`]()]
|
||||
[[`arXiv`](https://arxiv.org/abs/2405.14458)]
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
@ -81,5 +81,12 @@ Thanks for the great implementations!
|
||||
|
||||
If our code or models help your work, please cite our paper:
|
||||
```BibTeX
|
||||
|
||||
@misc{wang2024yolov10,
|
||||
title={YOLOv10: Real-Time End-to-End Object Detection},
|
||||
author={Ao Wang and Hui Chen and Lihao Liu and Kai Chen and Zijia Lin and Jungong Han and Guiguang Ding},
|
||||
year={2024},
|
||||
eprint={2405.14458},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.CV}
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user