ComfyUI Node
Adversarial Attack (FGSM/PGD)
FGSM 또는 PGD를 이용해 ResNet18이 다른 클래스로 분류하는 적대적 이미지를 생성합니다.
Adversarial Attack (FGSM/PGD)
- model
- image
- adversarial_image
- original_class_name
- adversarial_class_name
- original_class_idx
- adversarial_class_idx
◄attack_method▾►
◄epsilon0.030►
◄iterations40►
◄alpha0.007►
◄target_class-1►
◄resize_to_224true►
CategoryAdversarialAttack
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | RESNET_MODEL | — | |
| image | IMAGE | — | |
| attack_method | COMBO | 2 options: FGSM, PGD | |
| epsilon | FLOAT | 0.0300.001–0.3 | — |
| iterations | INT | 401–500 | — |
| alpha | FLOAT | 0.0070.001–0.1 | — |
| target_class | INT | -1-1–999 | — |
| resize_to_224 | BOOLEAN | true | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| adversarial_image | IMAGE | — |
| original_class_name | STRING | — |
| adversarial_class_name | STRING | — |
| original_class_idx | INT | — |
| adversarial_class_idx | INT | — |