File size: 348 Bytes
3dda64a
 
 
aa7cca8
 
3dda64a
 
8cba427
3dda64a
ceac16c
 
3dda64a
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
import RetinaFace

inputs = gr.inputs.Image(shape=(800, 600), source="upload", type='file')
gr.Interface(fn=RetinaFace, inputs=inputs, outputs="plot", title ="RetinaFace", allow_flagging = "never").launch(inbrowser= True)

def RetinaFace(img):
  faces = RetinaFace.extract_faces(img, align = True)
  return faces[0]