Model saved_model export (#151)

This commit is contained in:
Glenn Jocher 2023-01-06 21:44:44 +01:00 committed by GitHub
parent d17d1e064d
commit f8a13c49a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 8 deletions

View file

@ -52,8 +52,8 @@ class YOLO:
# Load or create new YOLO model
{'.pt': self._load, '.yaml': self._new}[Path(model).suffix](model)
def __call__(self, source):
return self.predict(source)
def __call__(self, source, **kwargs):
return self.predict(source, **kwargs)
def _new(self, cfg: str, verbose=True):
"""
@ -218,3 +218,4 @@ class YOLO:
args.pop("name", None)
args.pop("batch", None)
args.pop("epochs", None)
args.pop("cache", None)