Skip to content

Commit 82cbe6f

Browse files
committed
Changing flag from is_yolov8 to is_ultralytics as the enhancements to yolo feature facilitate many yolo versions to be used via ultralytics.
Signed-off-by: Kieran Fraser <[email protected]>
1 parent e403bc6 commit 82cbe6f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

art/estimators/object_detection/pytorch_yolo.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __init__(
6464
"loss_rpn_box_reg",
6565
),
6666
device_type: str = "gpu",
67-
is_yolov8: bool = False,
67+
is_ultralytics: bool = False,
6868
model_name: str | None = None,
6969
):
7070
"""
@@ -94,11 +94,9 @@ def __init__(
9494
'loss_objectness', and 'loss_rpn_box_reg'.
9595
:param device_type: Type of device to be used for model and tensors, if `cpu` run on CPU, if `gpu` run on GPU
9696
if available otherwise run on CPU.
97-
:param is_yolov8: The flag to be used for marking the YOLOv8+ model.
9897
:param model_name: The name of the model (e.g., 'yolov8n', 'yolov10n') for determining loss function.
9998
"""
100-
# Wrap the model with YoloWrapper if it's a YOLO v8+ model
101-
if is_yolov8:
99+
if is_ultralytics:
102100
from art.estimators.object_detection.pytorch_yolo_loss_wrapper import PyTorchYoloLossWrapper
103101

104102
model = PyTorchYoloLossWrapper(model, model_name)
@@ -114,7 +112,6 @@ def __init__(
114112
preprocessing=preprocessing,
115113
attack_losses=attack_losses,
116114
device_type=device_type,
117-
is_yolov8=is_yolov8,
118115
)
119116

120117
def _translate_labels(self, labels: list[dict[str, "torch.Tensor"]]) -> "torch.Tensor":

0 commit comments

Comments
 (0)