0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a,Security_and_MachineLearning/src/defensive_chap7/face_auth.py,,,#,11

Before Change



        // Prediction.
        pred = model.predict(array_img)[0]
        top_indices = pred.argsort()[-1:][::-1]
        results = [(classes[i], pred[i]) for i in top_indices]

        // Final judgement.
        judge = "Reject"
        prob = results[0][1] * 100
        if prob > THRESHOLD:
            judge = "Unlock"
        msg = "{} ({:.1f}%). res="{}"".format(results[0][0], prob, judge)
        print(msg)

        // Draw frame to face.

After Change


nb_classes = len(classes)

// Dimensions of training images.
img_width, img_height = 150, 150

// Load model.
print("Load trained model: {}".format(trained_model))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: 13o-bbr-bbq/machine_learning_security
Commit Name: 0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a
Time: 2020-01-08
Author: takaesu235@gmail.com
File Name: Security_and_MachineLearning/src/defensive_chap7/face_auth.py
Class Name:
Method Name:


Project Name: 13o-bbr-bbq/machine_learning_security
Commit Name: 0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a
Time: 2020-01-08
Author: takaesu235@gmail.com
File Name: Security_and_MachineLearning/src/defensive_chap7/face_auth.py
Class Name:
Method Name:


Project Name: LCAV/pyroomacoustics
Commit Name: 41efa2d36c4fab58b4e6ebb030bddabb9042d9e0
Time: 2020-07-28
Author: fakufaku@gmail.com
File Name: pyroomacoustics/doa/music.py
Class Name: MUSIC
Method Name: _subspace_decomposition


Project Name: astroML/astroML
Commit Name: b1402d88a210ddb402bee4189edd5bdb2ada8403
Time: 2019-01-02
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/tests/test_hist_binwidth.py
Class Name:
Method Name: test_freedman_bin_width