File size: 494 Bytes
be9fb11 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from yolo.yoloFace import YOLO_FACE
from vgg.vgg_face import MODEL_FACE
from database.retriever import BruteForceStore
import cv2
DB = BruteForceStore()
def pipeline(img):
images = YOLO_FACE(img)
for patch in images:
embeddings = MODEL_FACE(patch)
if DB(embeddings): return "Welcome!"
return "Buzz off!!! petrichor me chor"
if __name__ == "__main__":
import cv2
img = cv2.imread('temp.jpg', cv2.IMREAD_UNCHANGED)
print(pipeline(img)) |