File size: 584 Bytes
beacc91
 
 
 
112b1af
21c549a
 
 
 
 
 
 
 
 
 
 
 
 
52b0325
beacc91
 
 
 
4ccd918
beacc91
52b0325
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import gradio as gr
import face_recognition
import numpy as np
from PIL import Image

from deepface import DeepFace
import pandas as pd

# 이미지 경로
img1_path = 'path/to/image1.jpg'
img2_path = 'path/to/image2.jpg'

# 얼굴 유사도 측정
result = DeepFace.verify(img1_path, img2_path)

# 결과 출력
print("Face similarity:", result["verified"])


# Gradio 인터페이스 생성
iface = gr.Interface(fn=match_faces,
                     inputs=[gr.inputs.Image(shape=(224, 224)), gr.inputs.Image(shape=(224, 224))],
                     outputs="text")

iface.launch()