ultralytics 8.0.187 deprecate ultralytics.yolo usage (#5084)
Co-authored-by: Francisco Javier Gañán <95186237+javierganan99@users.noreply.github.com>
This commit is contained in:
parent
eb976f5ad2
commit
f2ed207571
11 changed files with 33 additions and 118 deletions
|
|
@ -430,19 +430,12 @@ class Boxes(BaseTensor):
|
|||
xywh[..., [1, 3]] /= self.orig_shape[0]
|
||||
return xywh
|
||||
|
||||
@property
|
||||
def boxes(self):
|
||||
"""Return the raw bboxes tensor (deprecated)."""
|
||||
LOGGER.warning("WARNING ⚠️ 'Boxes.boxes' is deprecated. Use 'Boxes.data' instead.")
|
||||
return self.data
|
||||
|
||||
|
||||
class Masks(BaseTensor):
|
||||
"""
|
||||
A class for storing and manipulating detection masks.
|
||||
|
||||
Attributes:
|
||||
segments (list): Deprecated property for segments (normalized).
|
||||
xy (list): A list of segments in pixel coordinates.
|
||||
xyn (list): A list of normalized segments.
|
||||
|
||||
|
|
@ -459,15 +452,6 @@ class Masks(BaseTensor):
|
|||
masks = masks[None, :]
|
||||
super().__init__(masks, orig_shape)
|
||||
|
||||
@property
|
||||
@lru_cache(maxsize=1)
|
||||
def segments(self):
|
||||
"""Return segments (normalized). Deprecated; use xyn property instead."""
|
||||
LOGGER.warning(
|
||||
"WARNING ⚠️ 'Masks.segments' is deprecated. Use 'Masks.xyn' for segments (normalized) and 'Masks.xy' for segments (pixels) instead."
|
||||
)
|
||||
return self.xyn
|
||||
|
||||
@property
|
||||
@lru_cache(maxsize=1)
|
||||
def xyn(self):
|
||||
|
|
@ -484,12 +468,6 @@ class Masks(BaseTensor):
|
|||
ops.scale_coords(self.data.shape[1:], x, self.orig_shape, normalize=False)
|
||||
for x in ops.masks2segments(self.data)]
|
||||
|
||||
@property
|
||||
def masks(self):
|
||||
"""Return the raw masks tensor. Deprecated; use data attribute instead."""
|
||||
LOGGER.warning("WARNING ⚠️ 'Masks.masks' is deprecated. Use 'Masks.data' instead.")
|
||||
return self.data
|
||||
|
||||
|
||||
class Keypoints(BaseTensor):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue