The equalAIs app provides three levels of protection and control to an image:
1. Adversial attack against face recognition 2. Stegnographic message encoding 3. Visible watermark |
|
Current REST API: https://equalais.ue.r.appspot.com
-
Install/configurature google cloud SDK
-
In your Google Cloud dashboard create a project,
{gcloud-project-name}
-
In a terminal, run:
gcloud app deploy gcp_rest_app.yaml --project {gcloud-project-name} --verbosity=info
-
Update the URL in
equalais.github.io/js/tool.js
to be URL defined in the console output from the above command.
-
Build the Docker image:
docker build . -t {equalais-image-name}
-
Spin up the container:
docker run -p 127.0.0.1:8080:8080 {equalais-image-name}
-
Then update the URL in
equalais.github.io/js/tool.js
to behttp://0.0.0.0:8080
.
In order to run components of equalAIs manually (i.e., not using the hosted tool), you will need to clone this repository. We do not currently provide a script for running the adversarial attack manually.
For details on implementation and argument options, please see the Python scripts in src.
The equalAIs webtool uses the following by default:
--message
:I do not consent to use of face detection on this image or derivatives of this image.
--token
:elephant_garlic_pizza
We are planning on updating our API to allow users to define their own message and decode token, however this is not currently available. In the meantime you can customize your steganographic message and token by running the steganography script manually.
If you would like to use a custom message and decoding token, you can run the steganography script using the following command in the root of this project:
python -m src.steganography encode path/to/photo.png --message "your-custom-message" --token "your-special-token"
You can decode your image that has been run through the equalAIs tool by running the following command in the root of this project:
python -m src.steganography decode "path/to/equalais/photo.png" --token "elephant_garlic_pizza"
If your image has been run through the webtool, by default this should return the message:
I do not consent to use of face detection on this image or derivatives of this image.
We use the Least Significant Bit (LSB) technique. The implementation we use is heavily based off of Abdou Rockikz's well-explained demonstration. Please note that a limitation of the LSB technique is that it only works on lossless compression images. As a result, we only write our images as .png
files.
Our tool is a proof-of-concept, and we welcome suggestions and pull-request contributions for more robust techniques!
You can also manually add a watermark to an image using the following command:
python -m src.watermark "path/to/photo.png"