elhusseiniali / loki Goto Github PK
View Code? Open in Web Editor NEWA graphical tool to test the robustness of classifiers using Foolbox.
A graphical tool to test the robustness of classifiers using Foolbox.
e.g.:
image_path = os.path.join(current_app.root_path,
'static/' + path,
image_fn)
would become
root_path = Path(current_app.root_path)
image_path = Path(root_path, 'static/', path, image_fn)
Possibly use a table to display class and predicted probability.
On branch visualize-ali
When authenticated, the /login route disconnect the user. It should go to home.
What is meant here is that if a user uploads something (by upload, we don't mean that it's stored in the server; it's just stored in the session) that is not accepted, it only throws an error after the submit button is pressed. Ideally, we want the error to be thrown as soon as the upload happens. This can be fixed by creating forms of forms: visualize_attack and predict forms would just need to use some UploadImageForm, then check that this validated properly, and then move on to the rest of the form with some logical AND of validations.
This was done on purpose, because we don't have logic to handle reports yet.
We need to rename the classes used in visualize_attack.html. image_preview__image is completely unacceptable as a name. We need to use more meaningful, user-friendly names.
The idea here is to not block out the form: instead of having to refresh the page to run another prediction or visualization, just have the form always active.
We could instead put another button that allows the user to launch another attack (the button would just refresh the page).
Without this, this could potentially cause bugs. Just offset user models starting with len(pretrained_models) + 1 so we never have a clash with model.id and the given ID in the selector.
Sometimes the classifier even throws some exception. For now, we can only take JPG/JPEG images. This has to be addressed soon. One possible idea is to create a PIL image, and then use transforms.ToTensor().
Currently it just says carotte and pomme.
Change scale=3.5 to a more dynamically-generated scale (divide original image res by result image res).
The point here is to improve the design used in forms.py: WTForms allows us to inherit other forms (FormField), which means that we can use the same ModelSelectForm, AttackSelectForm, etc... across different forms (prediction, attack visualization, model assessment...).
The table entry is set to show the model name instead of any actual report. This can be fixed by getting the most recent report on the model (using the model id).
Login and registration tests seem to be broken: I think the login and register functions defined in the Helper class are not working properly (after a quick debug session, the form.validate_on_submit() clause was not being executed). Most likely this has to do with how WTForms and Bootstrap play together. Ultimately the tests aren't too important, because of how simple the functions are. I would like to have them only for the sake of completion (tests for correct and incorrect login/registration).
There's no part in the logic used in the code that restricts us to facial recognition systems. This is just about nomenclature. Some routes and tests need to be changed to accommodate this rename.
Moving pretrained_choices to classifiers.py and attacks to attacks.py will allow for a more modular implementation of routes.visualize_attack() (instead of hard-coding the options).
can’t write when the message error appears (« Field must be equal to password. », « Invalid Username »…), we have to refresh the page
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.