39b587f1aef21060878707696d4e7251d72cd22b,examples/face_recognition_knn.py,,,#,147

Before Change


    source_img.show()

if __name__ == "__main__":
    knn_clf = train("knn_examples/train")
    for img_path in listdir("knn_examples/test"):
        preds = predict(join("knn_examples/test", img_path) ,knn_clf=knn_clf)
        print(preds)
        draw_preds(join("knn_examples/test", img_path), preds)

After Change



    // STEP 2: Using the trained classifier, make predictions for unknown images
    for image_file in os.listdir("knn_examples/test"):
        full_file_path = os.path.join("knn_examples/test", image_file)

        print("Looking for faces in {}".format(image_file))

        // Find all people in the image using a trained classifier model
        // Note: You can pass in either a classifier file name or a classifier model instance
        predictions = predict(full_file_path, model_path="trained_knn_model.clf")

        // Print results on the console
        for name, (top, right, bottom, left) in predictions:
            print("- Found {} at ({}, {})".format(name, left, top))

        // Display results overlaid on an image
        show_prediction_labels_on_image(os.path.join("knn_examples/test", image_file), predictions)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ageitgey/face_recognition
Commit Name: 39b587f1aef21060878707696d4e7251d72cd22b
Time: 2018-03-05
Author: ageitgey@gmail.com
File Name: examples/face_recognition_knn.py
Class Name:
Method Name:


Project Name: r9y9/wavenet_vocoder
Commit Name: 3210d75451d5d78ebe884c712f31800ca1ccd0b3
Time: 2018-01-03
Author: zryuichi@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: ageitgey/face_recognition
Commit Name: 39b587f1aef21060878707696d4e7251d72cd22b
Time: 2018-03-05
Author: ageitgey@gmail.com
File Name: examples/face_recognition_knn.py
Class Name:
Method Name:


Project Name: mariogeiger/se3cnn
Commit Name: 49a2ea975624090307c652e91258e5b6f02cda41
Time: 2018-10-25
Author: geiger.mario@gmail.com
File Name: examples/tetris.py
Class Name:
Method Name: main