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

Example Script for API's #2

Open
Delivers opened this issue Apr 3, 2024 · 1 comment
Open

Example Script for API's #2

Delivers opened this issue Apr 3, 2024 · 1 comment

Comments

@Delivers
Copy link

Delivers commented Apr 3, 2024

Hello, thank you for the toolbox.
I wounder if you could provide an python script of how to use the Google Cloud Vision AI & Imagga API in the same way you use it in the example: bat/examples/simba_attack_deepapi.py

thanks

@Delivers Delivers changed the title Example Script for Example Script for API's Apr 4, 2024
@wuhanstudio
Copy link
Owner

Hi Delivers,

Thank you for your interest in this project.

The SimBA attack in this repo only supports soft labels with probabilities that sum to 1.

As a result, we need to normalize the probability when attacking Google Cloud Vision AI & Imagga API.

Currently, I'm writing my PhD thesis and will add more examples in June.

Google Cloud:

/m/0k0pj  Nose                       0.98358
/m/04hgtk Head                       0.97286
/m/01yrx  Cat                        0.94985
/m/014sv8 Eye                        0.93809
/m/0307l  Felidae                    0.90201
/m/01lrl  Carnivore                  0.89830
/m/07k6w8 Small to medium-sized cats 0.87115
/m/0lxkm  Iris                       0.84477
/m/01l7qd Whiskers                   0.84136
/m/08xgn7 Comfort                    0.83831

Imagga:

kitten          100.00000
cat             100.00000
feline          96.67036
kitty           86.65300
pet             69.99963
fur             66.15558
animal          66.05514
young mammal    62.64771
cute            56.86220
domestic cat    53.07311

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