ultralytics 8.0.158
add benchmarks to coverage (#4432)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com>
This commit is contained in:
@ -55,12 +55,14 @@ class Predictor(BasePredictor):
|
||||
return img
|
||||
|
||||
def pre_transform(self, im):
|
||||
"""Pre-transform input image before inference.
|
||||
"""
|
||||
Pre-transform input image before inference.
|
||||
|
||||
Args:
|
||||
im (List(np.ndarray)): (N, 3, h, w) for tensor, [(h, w, 3) x N] for list.
|
||||
|
||||
Return: A list of transformed imgs.
|
||||
Returns:
|
||||
(list): A list of transformed images.
|
||||
"""
|
||||
assert len(im) == 1, 'SAM model has not supported batch inference yet!'
|
||||
return [LetterBox(self.args.imgsz, auto=False, center=False)(image=x) for x in im]
|
||||
|
Reference in New Issue
Block a user