ultralytics 8.0.164 new StreamLoader stream_buffer argument (#4596)
Co-authored-by: jgoo9410 <jjoohhnnggooddwwiinn@gmail.com> Co-authored-by: John Goodwin <johnf4g@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
bd96c0846b
commit
1121ef2409
8 changed files with 89 additions and 70 deletions
|
|
@ -209,7 +209,10 @@ class BasePredictor:
|
|||
self.imgsz = check_imgsz(self.args.imgsz, stride=self.model.stride, min_dim=2) # check image size
|
||||
self.transforms = getattr(self.model.model, 'transforms', classify_transforms(
|
||||
self.imgsz[0])) if self.args.task == 'classify' else None
|
||||
self.dataset = load_inference_source(source=source, imgsz=self.imgsz, vid_stride=self.args.vid_stride)
|
||||
self.dataset = load_inference_source(source=source,
|
||||
imgsz=self.imgsz,
|
||||
vid_stride=self.args.vid_stride,
|
||||
stream_buffer=self.args.stream_buffer)
|
||||
self.source_type = self.dataset.source_type
|
||||
if not getattr(self, 'stream', True) and (self.dataset.mode == 'stream' or # streams
|
||||
len(self.dataset) > 1000 or # images
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue