├── download.sh ├── Uground ├── scripts │ ├── preprocess │ │ ├── __pycache__ │ │ │ ├── params.cpython-310.pyc │ │ │ ├── __init__.cpython-310.pyc │ │ │ ├── constants.cpython-310.pyc │ │ │ ├── data_process.cpython-310.pyc │ │ │ ├── patch_image.cpython-310.pyc │ │ │ └── point_extract.cpython-310.pyc │ │ ├── constants.py │ │ ├── point_extract.py │ │ ├── patch_image.py │ │ ├── params.py │ │ └── data_process.py │ ├── untarget.py │ ├── target.py │ ├── infer_screenspot.py │ └── check_attack.py ├── infer.sh ├── untarget.sh ├── check.sh └── target.sh ├── OS-Atlas-7B ├── scripts │ ├── preprocess │ │ ├── __pycache__ │ │ │ ├── params.cpython-310.pyc │ │ │ ├── constants.cpython-310.pyc │ │ │ ├── data_process.cpython-310.pyc │ │ │ ├── patch_image.cpython-310.pyc │ │ │ └── point_extract.cpython-310.pyc │ │ ├── constants.py │ │ ├── point_extract.py │ │ ├── patch_image.py │ │ ├── params.py │ │ └── data_process.py │ ├── target.py │ ├── untarget.py │ ├── infer_screenspot.py │ └── check_attack.py ├── target.sh ├── untarget.sh ├── infer.sh └── check.sh ├── requirements.txt ├── generation_config.json ├── .gitignore ├── preprocessor_config.json ├── create_noisy.py ├── README.md └── datas └── screenspot_desktop_v2.json /download.sh: -------------------------------------------------------------------------------- 1 | cd datas 2 | wget https://huggingface.co/datasets/OS-Copilot/ScreenSpot-v2/resolve/main/screenspotv2_image.zip 3 | unzip screenspotv2_image.zip -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/params.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/params.cpython-310.pyc -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/constants.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/constants.cpython-310.pyc -------------------------------------------------------------------------------- /OS-Atlas-7B/scripts/preprocess/__pycache__/params.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/OS-Atlas-7B/scripts/preprocess/__pycache__/params.cpython-310.pyc -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/data_process.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/data_process.cpython-310.pyc -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/patch_image.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/patch_image.cpython-310.pyc -------------------------------------------------------------------------------- /OS-Atlas-7B/scripts/preprocess/__pycache__/constants.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/OS-Atlas-7B/scripts/preprocess/__pycache__/constants.cpython-310.pyc -------------------------------------------------------------------------------- /Uground/scripts/preprocess/__pycache__/point_extract.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/Uground/scripts/preprocess/__pycache__/point_extract.cpython-310.pyc -------------------------------------------------------------------------------- /OS-Atlas-7B/scripts/preprocess/__pycache__/data_process.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/OS-Atlas-7B/scripts/preprocess/__pycache__/data_process.cpython-310.pyc -------------------------------------------------------------------------------- /OS-Atlas-7B/scripts/preprocess/__pycache__/patch_image.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/OS-Atlas-7B/scripts/preprocess/__pycache__/patch_image.cpython-310.pyc -------------------------------------------------------------------------------- /OS-Atlas-7B/scripts/preprocess/__pycache__/point_extract.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ZZZhr-1/Robust_GUI_Grounding/HEAD/OS-Atlas-7B/scripts/preprocess/__pycache__/point_extract.cpython-310.pyc -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | transformers==4.45.1 2 | accelerate 3 | tiktoken 4 | einops 5 | transformers_stream_generator 6 | scipy 7 | torchvision 8 | pillow 9 | tensorboard 10 | matplotlib 11 | qwen-vl-utils -------------------------------------------------------------------------------- /generation_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "bos_token_id": 151643, 3 | "do_sample": true, 4 | "eos_token_id": [ 5 | 151645, 6 | 151643 7 | ], 8 | "pad_token_id": 151643, 9 | "temperature": 0.000001, 10 | "top_k": 1, 11 | "top_p": 0.001, 12 | "transformers_version": "4.45.0.dev0" 13 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | datas/screenspotv2_image.zip 2 | datas/screenspotv2_image 3 | datas/noisy_images 4 | datas/noisy_images_s 5 | outputs 6 | OS-Atlas-7B/os_check_result.txt 7 | OS-Atlas-7B/OS_infer_result.txt 8 | OS-Atlas-7B/one_step.sh 9 | 10 | Uground/Uground_check_result.txt 11 | Uground/Uground_infer_result.txt 12 | Uground/one_step.sh 13 | Uground/patch.sh 14 | Uground/scripts/patch_attack.py 15 | 16 | Uground-2B/ -------------------------------------------------------------------------------- /Uground/scripts/preprocess/constants.py: -------------------------------------------------------------------------------- 1 | IGNORE_INDEX = -100 2 | 3 | DEFAULT_IM_START_TOKEN = "<|im_start|>" 4 | DEFAULT_IM_END_TOKEN = "<|im_end|>" 5 | DEFAULT_IMAGE_TOKEN = "<|image_pad|>" 6 | DEFAULT_VIDEO_TOKEN = "<|video_pad|>" 7 | LLAVA_IMAGE_TOKEN = "" 8 | LLAVA_VIDEO_TOKEN = "