-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RobustDpatch doesn't work #2507
Comments
Hi @YXU300 Thank you very much for your interest in ART! How did you define |
class Yolo(torch.nn.Module):
model = torch.hub.load('ultralytics/yolov5', 'yolov5s') attack = RobustDPatch( loss_history = [] for images, image_names in get_images(data_dir):
print(f"Loss history over all batches: {loss_history}") Thanks for your reply, here is my code. This code is modified from adversarial patch example. |
I've also tried to run the example code and it also has no work. |
`attack = RobustDPatch(
estimator=detector,
patch_shape=(3, 100, 100),
patch_location=(0,0),
crop_range=[0, 0],
brightness_range=[1.0, 1.0],
rotation_weights=[1, 0, 0, 0],
sample_size=1,
learning_rate=1.99,
max_iter=200,
batch_size=1,
verbose=True,
targeted=True
)
loss_history = []
for images, image_names in get_images(data_dir):
dets = detector.predict(images)
y = []
for j in range(len(dets)):
print(f"Loss history over all batches: {loss_history}")
`
I tried to attack yolov5s, but it didn't work. The dataset is coco2017.
The text was updated successfully, but these errors were encountered: