Open
Description
Addition of back-end functionality for Feature-Squeezing
Task - Create a new file with a function implementing the Feature-Squeezing technique for detecting whether the uploaded image is adversarially perturbed or not.
Difficulty Level - Hard
Steps to be followed -
- Create a new file named "detection.py"
- In the newly created file, add a function named "feature_squeeze" which would take as input an image and would output a boolean value indicating whether the input image is adversarially perturbed. It should be following the framework -
def feature_squeeze():
model body
return boolean
- For creating the "feature_squeeze" function refer to the paper Feature Squeezing: Detecting Adversarial Examples in Deep Neural Networks
- Create the app-route python decorator for the algorithm in the app.py file.
- The function should be of the following framework -
@app.route('/cwl2', methods=['GET'])
def cwl2():
return render_template('cwl2.html')