Skip to content
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

Running white_box.sh #13

Open
HashmatShadab opened this issue Nov 3, 2024 · 1 comment
Open

Running white_box.sh #13

HashmatShadab opened this issue Nov 3, 2024 · 1 comment

Comments

@HashmatShadab
Copy link

`
#!/bin/bash

INPUT_DIR='./eval/evaluate/results/gen_results/{}/black_box/abstract'
IMAGE_SOURCE_DIR='./dataset/black_box/images'
IMAGE_DEST_DIR='./dataset/white_box/init_images'
SCENARIO='Violence'
ATTACK_MODEL='llava-15-7b'

MODEL_PATH="./checkpoint/llava-1.5-7b"
MODEL_BASE=None
SAVE_DIR="./dataset/white_box/images"
INPUT_PATH="./dataset/instructions"
IMAGE_DIR="./dataset/black_box/images"
MODE='abstract'

python white_box/generate_init_image.py
--input-dir "$INPUT_DIR"
--image-source-dir "$IMAGE_SOURCE_DIR"
--image-dest-dir "$IMAGE_DEST_DIR"
--scenario "$SCENARIO"
--attack-model "$ATTACK_MODEL"

python white_box/white_box_attack.py
--model_path "$MODEL_PATH"
--model-base "$MODEL_BASE"
--attack_model "$ATTACK_MODEL"
--save_dir "$SAVE_DIR"
--input_path "$INPUT_PATH"
--image-dir "$IMAGE_DIR"
--scenario "$SCENARIO"
--mode "$MODE"

echo "Scripts for initial image generation and white-box attack executed."
`

Can you please provide the images used to run the white_box script?

@pyogher
Copy link
Collaborator

pyogher commented Nov 11, 2024

Hi @HashmatShadab, you need to obtain the images from the black box part. After running bash ./amplifying_toxic.sh, you will get the images to be inputted into bash ./white_box.sh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants