mirror of
https://github.com/THU-MIG/yolov10.git
synced 2025-05-23 21:44:22 +08:00
Update MANIFEST.in (#4894)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
32f7c522b5
commit
daf16ecf31
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
@ -38,12 +38,11 @@ jobs:
|
|||||||
shell: python
|
shell: python
|
||||||
run: |
|
run: |
|
||||||
import os
|
import os
|
||||||
import pkg_resources as pkg
|
|
||||||
import ultralytics
|
import ultralytics
|
||||||
from ultralytics.utils.checks import check_latest_pypi_version
|
from ultralytics.utils.checks import check_latest_pypi_version
|
||||||
|
|
||||||
v_local = pkg.parse_version(ultralytics.__version__).release
|
v_local = tuple(map(int, ultralytics.__version__.split('.')))
|
||||||
v_pypi = pkg.parse_version(check_latest_pypi_version()).release
|
v_pypi = tuple(map(int, check_latest_pypi_version().split('.')))
|
||||||
print(f'Local version is {v_local}')
|
print(f'Local version is {v_local}')
|
||||||
print(f'PyPI version is {v_pypi}')
|
print(f'PyPI version is {v_pypi}')
|
||||||
d = [a - b for a, b in zip(v_local, v_pypi)] # diff
|
d = [a - b for a, b in zip(v_local, v_pypi)] # diff
|
||||||
|
@ -2,7 +2,4 @@ include *.md
|
|||||||
include requirements.txt
|
include requirements.txt
|
||||||
include LICENSE
|
include LICENSE
|
||||||
include setup.py
|
include setup.py
|
||||||
include ultralytics/assets/bus.jpg
|
|
||||||
include ultralytics/assets/zidane.jpg
|
|
||||||
recursive-include ultralytics *.yaml
|
|
||||||
recursive-exclude __pycache__ *
|
recursive-exclude __pycache__ *
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
comments: true
|
comments: true
|
||||||
description: Gain seamless experience in training and deploying your YOLOv5 and YOLOv8 models with Ultralytics HUB. Explore pre-trained models, templates and various integrations.
|
description: Gain insights into training and deploying your YOLOv5 and YOLOv8 models with Ultralytics HUB. Explore pre-trained models, templates and various integrations.
|
||||||
keywords: Ultralytics HUB, YOLOv5, YOLOv8, model training, model deployment, pretrained models, model integrations
|
keywords: Ultralytics HUB, YOLOv5, YOLOv8, model training, model deployment, pretrained models, model integrations
|
||||||
---
|
---
|
||||||
|
|
||||||
|
34
setup.py
34
setup.py
@ -3,7 +3,7 @@
|
|||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import find_packages, setup
|
||||||
|
|
||||||
# Settings
|
# Settings
|
||||||
FILE = Path(__file__).resolve()
|
FILE = Path(__file__).resolve()
|
||||||
@ -36,33 +36,6 @@ def parse_requirements(file_path: Path):
|
|||||||
return requirements
|
return requirements
|
||||||
|
|
||||||
|
|
||||||
def find_packages(start_dir, exclude=()):
|
|
||||||
"""
|
|
||||||
Custom implementation of setuptools.find_packages(). Finds all Python packages in a directory.
|
|
||||||
|
|
||||||
Args:
|
|
||||||
start_dir (str | Path, optional): The directory where the search will start. Defaults to the current directory.
|
|
||||||
exclude (list | tuple, optional): List of package names to exclude. Defaults to None.
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
List[str]: List of package names.
|
|
||||||
"""
|
|
||||||
|
|
||||||
packages = []
|
|
||||||
start_dir = Path(start_dir)
|
|
||||||
root_package = start_dir.name
|
|
||||||
|
|
||||||
if '__init__.py' in [child.name for child in start_dir.iterdir()]:
|
|
||||||
packages.append(root_package)
|
|
||||||
for package in start_dir.rglob('*'):
|
|
||||||
if package.is_dir() and '__init__.py' in [child.name for child in package.iterdir()]:
|
|
||||||
package_name = f"{root_package}.{package.relative_to(start_dir).as_posix().replace('/', '.')}"
|
|
||||||
if package_name not in exclude:
|
|
||||||
packages.append(package_name)
|
|
||||||
|
|
||||||
return packages
|
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='ultralytics', # name of pypi package
|
name='ultralytics', # name of pypi package
|
||||||
version=get_version(), # version of pypi package
|
version=get_version(), # version of pypi package
|
||||||
@ -79,7 +52,10 @@ setup(
|
|||||||
'Source': 'https://github.com/ultralytics/ultralytics'},
|
'Source': 'https://github.com/ultralytics/ultralytics'},
|
||||||
author='Ultralytics',
|
author='Ultralytics',
|
||||||
author_email='hello@ultralytics.com',
|
author_email='hello@ultralytics.com',
|
||||||
packages=find_packages(start_dir='ultralytics'), # required
|
packages=find_packages(), # required
|
||||||
|
package_data={
|
||||||
|
'': ['*.yaml'],
|
||||||
|
'ultralytics.assets': ['*.jpg']},
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
install_requires=parse_requirements(PARENT / 'requirements.txt'),
|
install_requires=parse_requirements(PARENT / 'requirements.txt'),
|
||||||
extras_require={
|
extras_require={
|
||||||
|
@ -426,7 +426,7 @@ class BaseTrainer:
|
|||||||
"""Save model training checkpoints with additional metadata."""
|
"""Save model training checkpoints with additional metadata."""
|
||||||
import pandas as pd # scope for faster startup
|
import pandas as pd # scope for faster startup
|
||||||
metrics = {**self.metrics, **{'fitness': self.fitness}}
|
metrics = {**self.metrics, **{'fitness': self.fitness}}
|
||||||
results = {k.strip(): v for k, v in pd.read_csv(self.save_dir / 'results.csv').to_dict(orient='list').items()}
|
results = {k.strip(): v for k, v in pd.read_csv(self.csv).to_dict(orient='list').items()}
|
||||||
ckpt = {
|
ckpt = {
|
||||||
'epoch': self.epoch,
|
'epoch': self.epoch,
|
||||||
'best_fitness': self.best_fitness,
|
'best_fitness': self.best_fitness,
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
## comments: true description: Learn how to use Ultralytics YOLO for object tracking in video streams. Guides to use different trackers and customise tracker configurations. keywords: Ultralytics, YOLO, object tracking, video streams, BoT-SORT, ByteTrack, Python guide, CLI guide
|
|
||||||
|
|
||||||
# Multi-Object Tracking with Ultralytics YOLO
|
# Multi-Object Tracking with Ultralytics YOLO
|
||||||
|
|
||||||
<img width="1024" src="https://user-images.githubusercontent.com/26833433/243418637-1d6250fd-1515-4c10-a844-a32818ae6d46.png">
|
<img width="1024" src="https://user-images.githubusercontent.com/26833433/243418637-1d6250fd-1515-4c10-a844-a32818ae6d46.png">
|
||||||
|
@ -11,15 +11,12 @@ try:
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from importlib.metadata import version
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import pkg_resources as pkg
|
from ultralytics.utils.checks import check_version
|
||||||
|
|
||||||
ver = version('dvclive')
|
if not check_version(dvclive.__version__, '2.11.0', name='dvclive', verbose=True):
|
||||||
if pkg.parse_version(ver) < pkg.parse_version('2.11.0'):
|
dvclive = None
|
||||||
LOGGER.debug(f'DVCLive is detected but version {ver} is incompatible (>=2.11 required).')
|
|
||||||
dvclive = None # noqa: F811
|
|
||||||
|
|
||||||
# DVCLive logger instance
|
# DVCLive logger instance
|
||||||
live = None
|
live = None
|
||||||
@ -74,9 +71,7 @@ def on_pretrain_routine_start(trainer):
|
|||||||
try:
|
try:
|
||||||
global live
|
global live
|
||||||
live = dvclive.Live(save_dvc_exp=True, cache_images=True)
|
live = dvclive.Live(save_dvc_exp=True, cache_images=True)
|
||||||
LOGGER.info(
|
LOGGER.info("DVCLive is detected and auto logging is enabled (run 'yolo settings dvc=False' to disable).")
|
||||||
f'DVCLive is detected and auto logging is enabled (can be disabled in the {SETTINGS.file} with `dvc: false`).'
|
|
||||||
)
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOGGER.warning(f'WARNING ⚠️ DVCLive installed but not initialized correctly, not logging this run. {e}')
|
LOGGER.warning(f'WARNING ⚠️ DVCLive installed but not initialized correctly, not logging this run. {e}')
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
# Ultralytics YOLO 🚀, AGPL-3.0 license
|
||||||
|
|
||||||
import contextlib
|
import contextlib
|
||||||
import glob
|
import glob
|
||||||
import inspect
|
import inspect
|
||||||
@ -15,7 +16,6 @@ from typing import Optional
|
|||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import pkg_resources as pkg
|
import pkg_resources as pkg
|
||||||
import psutil
|
|
||||||
import requests
|
import requests
|
||||||
import torch
|
import torch
|
||||||
from matplotlib import font_manager
|
from matplotlib import font_manager
|
||||||
@ -141,7 +141,7 @@ def check_version(current: str = '0.0.0',
|
|||||||
elif op == '<' and not (current < version):
|
elif op == '<' and not (current < version):
|
||||||
result = False
|
result = False
|
||||||
if not result:
|
if not result:
|
||||||
warning_message = f'WARNING ⚠️ {name}{required} is required, but {name}{current} is currently installed'
|
warning_message = f'WARNING ⚠️ {name}{op}{required} is required, but {name}=={current} is currently installed'
|
||||||
if hard:
|
if hard:
|
||||||
raise ModuleNotFoundError(emojis(warning_message)) # assert version requirements met
|
raise ModuleNotFoundError(emojis(warning_message)) # assert version requirements met
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -321,7 +321,7 @@ def check_torchvision():
|
|||||||
|
|
||||||
if v_torch in compatibility_table:
|
if v_torch in compatibility_table:
|
||||||
compatible_versions = compatibility_table[v_torch]
|
compatible_versions = compatibility_table[v_torch]
|
||||||
if all(pkg.parse_version(v_torchvision) != pkg.parse_version(v) for v in compatible_versions):
|
if all(v_torchvision != v for v in compatible_versions):
|
||||||
print(f'WARNING ⚠️ torchvision=={v_torchvision} is incompatible with torch=={v_torch}.\n'
|
print(f'WARNING ⚠️ torchvision=={v_torchvision} is incompatible with torch=={v_torch}.\n'
|
||||||
f"Run 'pip install torchvision=={compatible_versions[0]}' to fix torchvision or "
|
f"Run 'pip install torchvision=={compatible_versions[0]}' to fix torchvision or "
|
||||||
"'pip install -U torch torchvision' to update both.\n"
|
"'pip install -U torch torchvision' to update both.\n"
|
||||||
@ -404,6 +404,8 @@ def check_imshow(warn=False):
|
|||||||
|
|
||||||
def check_yolo(verbose=True, device=''):
|
def check_yolo(verbose=True, device=''):
|
||||||
"""Return a human-readable YOLO software and hardware summary."""
|
"""Return a human-readable YOLO software and hardware summary."""
|
||||||
|
import psutil
|
||||||
|
|
||||||
from ultralytics.utils.torch_utils import select_device
|
from ultralytics.utils.torch_utils import select_device
|
||||||
|
|
||||||
if is_jupyter():
|
if is_jupyter():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user