@@ -64,7 +64,7 @@ def __init__(
64
64
"loss_rpn_box_reg" ,
65
65
),
66
66
device_type : str = "gpu" ,
67
- is_yolov8 : bool = False ,
67
+ is_ultralytics : bool = False ,
68
68
model_name : str | None = None ,
69
69
):
70
70
"""
@@ -94,11 +94,9 @@ def __init__(
94
94
'loss_objectness', and 'loss_rpn_box_reg'.
95
95
:param device_type: Type of device to be used for model and tensors, if `cpu` run on CPU, if `gpu` run on GPU
96
96
if available otherwise run on CPU.
97
- :param is_yolov8: The flag to be used for marking the YOLOv8+ model.
98
97
:param model_name: The name of the model (e.g., 'yolov8n', 'yolov10n') for determining loss function.
99
98
"""
100
- # Wrap the model with YoloWrapper if it's a YOLO v8+ model
101
- if is_yolov8 :
99
+ if is_ultralytics :
102
100
from art .estimators .object_detection .pytorch_yolo_loss_wrapper import PyTorchYoloLossWrapper
103
101
104
102
model = PyTorchYoloLossWrapper (model , model_name )
@@ -114,7 +112,6 @@ def __init__(
114
112
preprocessing = preprocessing ,
115
113
attack_losses = attack_losses ,
116
114
device_type = device_type ,
117
- is_yolov8 = is_yolov8 ,
118
115
)
119
116
120
117
def _translate_labels (self , labels : list [dict [str , "torch.Tensor" ]]) -> "torch.Tensor" :
0 commit comments