Fix model re-fuse() in inference loops (#466)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ayush Chaurasia <ayush.chaurarsia@gmail.com>
This commit is contained in:
parent
cc3c774bde
commit
a86218b767
22 changed files with 135 additions and 66 deletions
|
|
@ -1,7 +1,9 @@
|
|||
# Ultralytics YOLO 🚀, GPL-3.0 license
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
from ultralytics import __version__, yolo
|
||||
|
|
@ -17,7 +19,7 @@ CLI_HELP_MSG = \
|
|||
|
||||
pip install ultralytics
|
||||
|
||||
2. Train, Val, Predict and Export using 'yolo' commands of the form:
|
||||
2. Train, Val, Predict and Export using 'yolo' commands:
|
||||
|
||||
yolo TASK MODE ARGS
|
||||
|
||||
|
|
@ -97,9 +99,14 @@ def entrypoint():
|
|||
It uses the package's default config and initializes it using the passed overrides.
|
||||
Then it calls the CLI function with the composed config
|
||||
"""
|
||||
if len(sys.argv) == 1: # no arguments passed
|
||||
LOGGER.info(CLI_HELP_MSG)
|
||||
return
|
||||
|
||||
parser = argparse.ArgumentParser(description='YOLO parser')
|
||||
parser.add_argument('args', type=str, nargs='+', help='YOLO args')
|
||||
args = parser.parse_args().args
|
||||
args = re.sub(r'\s*=\s*', '=', ' '.join(args)).split(' ') # remove whitespaces around = sign
|
||||
|
||||
tasks = 'detect', 'segment', 'classify'
|
||||
modes = 'train', 'val', 'predict', 'export'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue