ImageNet names, classify inference, resume fixes (#712)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Laughing <61612323+Laughing-q@users.noreply.github.com>
This commit is contained in:
Glenn Jocher 2023-01-30 22:34:28 +01:00 committed by GitHub
parent aecd17d455
commit 522f1937ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1121 additions and 115 deletions

View file

@ -113,9 +113,9 @@ class BasePredictor:
else:
return list(self.stream_inference(source, model)) # merge list of Result into one
def predict_cli(self):
def predict_cli(self, source=None, model=None):
# Method used for CLI prediction. It uses always generator as outputs as not required by CLI mode
gen = self.stream_inference()
gen = self.stream_inference(source, model)
for _ in gen: # running CLI inference without accumulating any outputs (do not modify)
pass