Update YOLOv5 YAMLs to 'u' YAMLs (#800)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
0d182e80f1
commit
21ae321bc2
17 changed files with 68 additions and 46 deletions
|
|
@ -120,9 +120,6 @@ class BasePredictor:
|
|||
pass
|
||||
|
||||
def setup_source(self, source):
|
||||
if not self.model:
|
||||
raise Exception("Model not initialized!")
|
||||
|
||||
self.imgsz = check_imgsz(self.args.imgsz, stride=self.model.stride, min_dim=2) # check image size
|
||||
self.dataset = load_inference_source(source=source,
|
||||
transforms=getattr(self.model.model, 'transforms', None),
|
||||
|
|
@ -190,6 +187,10 @@ class BasePredictor:
|
|||
if self.args.verbose:
|
||||
LOGGER.info(f"{s}{'' if len(preds) else '(no detections), '}{self.dt[1].dt * 1E3:.1f}ms")
|
||||
|
||||
# Release assets
|
||||
if isinstance(self.vid_writer[-1], cv2.VideoWriter):
|
||||
self.vid_writer[-1].release() # release final video writer
|
||||
|
||||
# Print results
|
||||
if self.args.verbose and self.seen:
|
||||
t = tuple(x.t / self.seen * 1E3 for x in self.dt) # speeds per image
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue