ultralytics 8.0.172 faster LetterBox() and Classify Tune fix (#4766)
Co-authored-by: BardJun <70683507+jy1002@users.noreply.github.com>
This commit is contained in:
parent
577d066fb2
commit
8fd9a1a048
8 changed files with 68 additions and 26 deletions
|
|
@ -143,8 +143,8 @@ class BasePredictor:
|
|||
(list): A list of transformed images.
|
||||
"""
|
||||
same_shapes = all(x.shape == im[0].shape for x in im)
|
||||
auto = same_shapes and self.model.pt
|
||||
return [LetterBox(self.imgsz, auto=auto, stride=self.model.stride)(image=x) for x in im]
|
||||
letterbox = LetterBox(self.imgsz, auto=same_shapes and self.model.pt, stride=self.model.stride)
|
||||
return [letterbox(image=x) for x in im]
|
||||
|
||||
def write_results(self, idx, results, batch):
|
||||
"""Write inference results to a file or directory."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue