ultralytics 8.0.19 seg/det dataset warning and DDP-cls/seg fixes (#595)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: 曾逸夫(Zeng Yifu) <41098760+Zengyf-CVer@users.noreply.github.com> Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
parent
936414c615
commit
520825c4b2
21 changed files with 103 additions and 63 deletions
|
|
@ -53,7 +53,12 @@ class YOLO:
|
|||
self.overrides = {} # overrides for trainer object
|
||||
|
||||
# Load or create new YOLO model
|
||||
{'.pt': self._load, '.yaml': self._new}[Path(model).suffix](model)
|
||||
load_methods = {'.pt': self._load, '.yaml': self._new}
|
||||
suffix = Path(model).suffix
|
||||
if suffix in load_methods:
|
||||
{'.pt': self._load, '.yaml': self._new}[suffix](model)
|
||||
else:
|
||||
raise NotImplementedError(f"'{suffix}' model loading not implemented")
|
||||
|
||||
def __call__(self, source=None, stream=False, verbose=False, **kwargs):
|
||||
return self.predict(source, stream, verbose, **kwargs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue