<reponame>marshall4471/DeepFace_for_experiment
# -*- coding: utf-8 -*-
"""deepfaceipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1wlOTMIqogMyuAMtpIfKwOzoNnuhjLOx2
"""

!pip install DeepFace

import time

import matplotlib.pyplot as plt

import cv2

from deepface import DeepFace

from google.colab import files
uploaded = files.upload()

from google.colab import files
uploaded = files.upload()

img1 = cv2.imread('<NAME>.jpg')

img2 = cv2.imread('johnny-depp 2.jpg')

image_face = DeepFace.detectFace(img1)

print(img2)



def verification(img1, img2, model_name = "VGG-Face",
                 distance_metric = "cosine"):
                 start = time.time()
                 result = DeepFace.verify(img1, img2, model_name=model_name,
                                           distance_metric=distance_metric)
                 print(result)
                 demography = DeepFace.analyze(img1, 
                 ['age', 'gender', 'emotion'])
                 print(demography)
                 end = time.time()
                 print("Total time taken : ",
                 end - start)

verification(img1 = '<NAME>.jpg', img2= 'johnny-depp 2.jpg')








# -*- coding: utf-8 -*-
"""deepfaceipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1wlOTMIqogMyuAMtpIfKwOzoNnuhjLOx2
"""

!pip install DeepFace

import time

import matplotlib.pyplot as plt

import cv2

from deepface import DeepFace

from google.colab import files
uploaded = files.upload()

from google.colab import files
uploaded = files.upload()

img1 = cv2.imread('<NAME>.jpg')

img2 = cv2.imread('johnny-depp 2.jpg')

image_face = DeepFace.detectFace(img1)

print(img2)



def verification(img1, img2, model_name = "VGG-Face",
                 distance_metric = "cosine"):
                 start = time.time()
                 result = DeepFace.verify(img1, img2, model_name=model_name,
                                           distance_metric=distance_metric)
                 print(result)
                 demography = DeepFace.analyze(img1, 
                 ['age', 'gender', 'emotion'])
                 print(demography)
                 end = time.time()
                 print("Total time taken : ",
                 end - start)

verification(img1 = '<NAME>.jpg', img2= 'johnny-depp 2.jpg')
# -*- coding: utf-8 -*- deepfaceipynb  Automatically generated by Colaboratory.  Original file is located at     https://colab.research.google.com/drive/1wlOTMIqogMyuAMtpIfKwOzoNnuhjLOx2