auto-attack icon indicating copy to clipboard operation
auto-attack copied to clipboard

Can AutoAttack be used to dense prediction task?

Open zhanglijun95 opened this issue 3 years ago • 2 comments

Dear Author,

Thank you for your work and code! Recently I'm trying to apply AutoAttack on dense prediction tasks like semantic segmentation, but I got some error messages. So I'm wondering whether your package supports dense prediction task or currently it can only support classification task? Wait for your response. Thank you!

Best

zhanglijun95 avatar Dec 20 '22 20:12 zhanglijun95

Hi,

at the moment only classification tasks are supported. Adapting APGD and Square to optimize a different loss (i.e. when you have dense predictions) should be possible, but would require some adaptation of the code. If you have a reference to an example of the case you're considering, I'd be happy to have a look.

fra31 avatar Dec 21 '22 13:12 fra31

Thank you for your kind reply! The case I'm considering is a segmentation task. The input is in [B, C, H, W], where B is the batch size, C is 3, H and W are the height and width of the image. The label is in [B, 1, H, W], which indicates the class label for each pixel in the input. The output of the model is in [B, 40, H, W], where 40 is the number of classes for this segmentation task. Do you have any suggestion for me to fit my case? Thank you!

zhanglijun95 avatar Dec 21 '22 21:12 zhanglijun95