is_ascii
Check if a string is composed of only ASCII characters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
s |
str
|
String to be checked. |
required |
Returns:
Name | Type | Description |
---|---|---|
bool |
bool
|
True if the string is composed only of ASCII characters, False otherwise. |
Source code in ultralytics/yolo/utils/checks.py
check_imgsz
Verify image size is a multiple of the given stride in each dimension. If the image size is not a multiple of the stride, update it to the nearest multiple of the stride that is greater than or equal to the given floor value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
imgsz |
int) or (cList[int]
|
Image size. |
required |
stride |
int
|
Stride value. |
32
|
min_dim |
int
|
Minimum number of dimensions. |
1
|
floor |
int
|
Minimum allowed value for image size. |
0
|
Returns:
Type | Description |
---|---|
List[int]
|
Updated image size. |
Source code in ultralytics/yolo/utils/checks.py
check_version
Check current version against the required minimum version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
current |
str
|
Current version. |
'0.0.0'
|
minimum |
str
|
Required minimum version. |
'0.0.0'
|
name |
str
|
Name to be used in warning message. |
'version '
|
pinned |
bool
|
If True, versions must match exactly. If False, minimum version must be satisfied. |
False
|
hard |
bool
|
If True, raise an AssertionError if the minimum version is not met. |
False
|
verbose |
bool
|
If True, print warning message if minimum version is not met. |
False
|
Returns:
Type | Description |
---|---|
bool
|
True if minimum version is met, False otherwise. |
Source code in ultralytics/yolo/utils/checks.py
check_latest_pypi_version
Returns the latest version of a PyPI package without downloading or installing it.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
package_name |
str
|
The name of the package to find the latest version for. |
'ultralytics'
|
Returns:
Type | Description |
---|---|
str
|
The latest version of the package. |
Source code in ultralytics/yolo/utils/checks.py
check_pip_update_available
Checks if a new version of the ultralytics package is available on PyPI.
Returns:
Type | Description |
---|---|
bool
|
True if an update is available, False otherwise. |
Source code in ultralytics/yolo/utils/checks.py
check_font
Find font locally or download to user's configuration directory if it does not already exist.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
font |
str
|
Path or name of font. |
'Arial.ttf'
|
Returns:
Name | Type | Description |
---|---|---|
file |
Path
|
Resolved font file path. |
Source code in ultralytics/yolo/utils/checks.py
check_python
Check current python version against the required minimum version.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
minimum |
str
|
Required minimum version of python. |
'3.7.0'
|
Returns:
Type | Description |
---|---|
bool
|
None |
Source code in ultralytics/yolo/utils/checks.py
check_requirements
Check if installed dependencies meet YOLOv8 requirements and attempt to auto-update if needed.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
requirements |
Union[Path, str, List[str]]
|
Path to a requirements.txt file, a single package requirement as a string, or a list of package requirements as strings. |
ROOT.parent / 'requirements.txt'
|
exclude |
Tuple[str]
|
Tuple of package names to exclude from checking. |
()
|
install |
bool
|
If True, attempt to auto-update packages that don't meet requirements. |
True
|
cmds |
str
|
Additional commands to pass to the pip install command when auto-updating. |
''
|
Source code in ultralytics/yolo/utils/checks.py
check_suffix
Check file(s) for acceptable suffix.
Source code in ultralytics/yolo/utils/checks.py
check_yolov5u_filename
Replace legacy YOLOv5 filenames with updated YOLOv5u filenames.
Source code in ultralytics/yolo/utils/checks.py
check_file
Search/download file (if necessary) and return path.
Source code in ultralytics/yolo/utils/checks.py
check_yaml
check_imshow
Check if environment supports image displays.
Source code in ultralytics/yolo/utils/checks.py
check_yolo
Return a human-readable YOLO software and hardware summary.
Source code in ultralytics/yolo/utils/checks.py
git_describe
Source code in ultralytics/yolo/utils/checks.py
print_args
Print function arguments (optional args dict).
Source code in ultralytics/yolo/utils/checks.py
Created 2023-04-16, Updated 2023-05-17
Authors: Glenn Jocher (3)