ultralytics 8.3.60 Fix CoreML Segment inference (#18649)
Signed-off-by: Mohammed Yasin <32206511+Y-T-G@users.noreply.github.com> Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: Glenn Jocher <glenn.jocher@ultralytics.com>
This commit is contained in:
parent
9045d8fecc
commit
a6303020e6
2 changed files with 4 additions and 5 deletions
|
|
@ -617,10 +617,9 @@ class AutoBackend(nn.Module):
|
|||
# box = xywh2xyxy(y['coordinates'] * [[w, h, w, h]]) # xyxy pixels
|
||||
# conf, cls = y['confidence'].max(1), y['confidence'].argmax(1).astype(np.float32)
|
||||
# y = np.concatenate((box, conf.reshape(-1, 1), cls.reshape(-1, 1)), 1)
|
||||
elif len(y) == 1: # classification model
|
||||
y = list(y.values())
|
||||
elif len(y) == 2: # segmentation model
|
||||
y = list(reversed(y.values())) # reversed for segmentation models (pred, proto)
|
||||
y = list(y.values())
|
||||
if len(y) == 2 and len(y[1].shape) != 4: # segmentation model
|
||||
y = list(reversed(y)) # reversed for segmentation models (pred, proto)
|
||||
|
||||
# PaddlePaddle
|
||||
elif self.paddle:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue