VDIGPKU / T-SEA

[CVPR 2023] T-SEA: Transfer-based Self-Ensemble Attack on Object Detection
93 stars 10 forks source link

About rescaling the Ground_Truth label in coco_process.py #16

Closed Kegard closed 12 months ago

Kegard commented 1 year ago

Hello,Thank you for your work! And I have some issues about thecoco_process.py

As you said in README,

  1. where the xyxy coordinates of the bbox is scale into [0, 1] or a rescaled version as [0, input_size]. The latter one can meet formatting requirements of mAP.py. The rescaled label file format will be like: . The default rescale_factor is 416, but not every imgae'size is 416, how can we rescaled to[0,input_size]?
  2. The code yolo_bbox *= rescale_factor seems that can't rescale the yolo_bbox, but repeat the yolo_bbox rescale_factor times? I revised the codes and get the same ground_truth as you update.

Thank you for your reply!

ziyannchen commented 12 months ago

Thanks for reaching out. This is a bug, and we've fixed it in the update, please check it.

Kegard commented 12 months ago

Thank you for your reply. And I have another question about the Inference stage. During the inference stage, I used the v5-demo.png as the patch and configs/eval/coco80.yaml as the config, the I got the det-mAP.txt like this:

model name      :         mAP
yolov2          :   26.28
yolov3          :   39.38
yolov3-tiny     :   20.88
yolov4          :   50.6
yolov4-tiny     :   30.56
yolov5          :   36.58

I want to know which result is white-block attack and which is black-block attack?

ziyannchen commented 12 months ago

v5-demo.png is a patch trained in YOLOv5(the attacked model), so when you attack the yolov5 model (training settings are the same as our attacked yolov5 model, e.g. size), it's supposed to be a white-box attack. Any other models different from the attacked model should be the black-box model. You can refer to some review papers in the attack field for more information.

Kegard commented 12 months ago

I have read the code of uap_apply() and understand the attack function. Thank you very much!Wish you academic NB!