Code Monkey home page Code Monkey logo

faceidentification's People

Contributors

yeonnwoo avatar

Watchers

 avatar

Forkers

baeksh0420

faceidentification's Issues

[질문] 학습 모델 저장 형태

https://colab.research.google.com/drive/1ecuN0TCWleHSg9cI3FZ3t23N9MjTid-H?authuser=1#scrollTo=0wupx69wiCBM

위 학습 코드를 기반으로
코드를 돌리면 밑에 첨부한 파일과 같은 배열 형태가 나오는데 저장을위해 실습을 참고하여 학습모델을 저장하였는데 저장형태가 달라서 그런지 오류가 뜹니다ㅜㅜ 어떻게 저장해야될지 모르겠어요 ㅠㅡㅠㅠㅡㅠㅡㅠㅡㅠㅡㅠㅡㅠ

학습 모델 저장을 위한 그래프 설정

saver = tf.train.Saver()

학습 모델 이름 설정

path = '/content/gdrive/My Drive/Colab Notebooks/김고은saved.cpkt'

학습 모델 저장

save_path = saver.save(database,path)

image

[질문] AI 해커톤 참가 의사

페이스타임 팀원분들께

  • AI 해커톤 참가여부를 함께 협의 후 저를 멘션(@unizard )하여 알려주세요.
  • 이번이 첫AI 해커톤 대회인지라 수상할 가능성이 매우 높으니, 되도록 긍정적으로 검토 부탁 드립니다.

사람별 x값 배열 정리

import face_recognition
import cv2
import numpy as np
import glob
import os
import logging

IMAGES_PATH = 'gdrive/My Drive/dataset/김고은' # put your reference images in here
CAMERA_DEVICE_ID = 0
MAX_DISTANCE = 0.6 # increase to make recognition less strict, decrease to make more strict

def get_face_embeddings_from_image(image, convert_to_rgb=False):
"""
Take a raw image and run both the face detection and face embedding model on it
"""
# Convert from BGR to RGB if needed
if convert_to_rgb:
image = image[:, :, ::-1]

# run the face detection model to find face locations
face_locations = face_recognition.face_locations(image)

# run the embedding model to get face embeddings for the supplied locations
face_encodings = face_recognition.face_encodings(image, face_locations)

return face_locations, face_encodings

def setup_database():
"""
Load reference images and create a database of their face encodings
"""
database = np.array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])

for filename in glob.glob(os.path.join(IMAGES_PATH, '*.jpg')):
    # load image
    image_rgb = face_recognition.load_image_file(filename)
    #key와 value반환


    # use the name in the filename as the identity key
    identity = os.path.splitext(os.path.basename(filename))[0]
    #os.path.splitext(filename) > 확장자만 따로 분류한다.(리스트로 나타낸다)
    #os.path.basename(filename) > 파일이름만 출력을 한다.



    # get the face encoding and link it to the identity
    locations, encodings = get_face_embeddings_from_image(image_rgb)
  
    
    database = np.vstack([database, encodings])

return database

database = setup_database()
print('database=', database)

[수정본]계획서

주제선정의 이유

표정 분류기보단 인물 분류기가 데이터셋을 직접 모아 가공하고 학습하는 부분에서 더 적합하다고 생각했다. 또한 인물 분류기가 우리의 일상생활에서 더 유용하게 사용 될 것 같아 주제를 변경하게 되었다.

<일상생활에서의 응용>

  • 얼굴인식을 통한 자동 출석체크는 교수님이 일일이 출석을 부르기 힘든 대형강의 나 부정출석, 대리출석을 방지하기 위해 사용되면 좋을 것 같다.

  • 개인정보 보호 프로그램은 노트북을 통해 중요한 업무를 보거나 은행관련 업무 등 타인에게 노출되면 안되는 정보들을 확인하는 경우가 많은 요즘 시대에 다른 사람에게 정보를 노출시키지 않기 위해 사용되면 어떨까 하여 이 주제를 선정하게 되었다.

팀원간 역할분담(변경가능)

  • 김연우 : 깃허브 관리, 전반적인 코드작성 (opencv로 웹캠 작동하기, face_recognition 사용 이미지 읽어오기, 수집한 데이터셋과 비교하여 학습 및 분류하기 코드,이미지를 데이터 가공하는 코드 등)

  • 송민주 : 데이터수집 , 사람 인식하기,open cv 로 카메라 작동하기,깃허브 관리

  • 백소현 :데이터 수집, 이미지를 데이터로 변경 및 분류 코드 작성, 학습 이미지와 테스트 이미지 비교 코드, cost와 정확도 학습 코드

  • 이세정 : opencv로 웹캠 작동하기,사람 인식하기,이미지데이터 불러오기,이미지(데이터)분류,비교

프로젝트를 통한 예상 결과물

사진 데이터로 여러 인물의 얼굴을 학습시켜 카메라에 비춰지는 인물의 얼굴을 식별하는 프로그램의 응용

  • 카메라를 사용하여 사람의 얼굴을 인식하고 사전에 수집한 데이터의 학습을 토대로 인물을 분류하여 인식된 사람이 누구인지 알아낸다. 이를 응용하여 인식된 사람의 이름을 엑셀에 연동해 자동으로 출석체크가 가능하게 하는 카메라를 활용한 출석체크 프로그램.

  • 특정 인물이 아닌 다른 사람이 카메라에 인식될 때 노트북으로 보고있던 개인용무 창을 자동으로 다른 창으로 바꿔주는 개인정보 자동 보호 프로그램.

DataSet

  • 조원 4명의 사진과 NAVER 및 GOOGLE을 이용하여 유명인 약 6명의 사진을 정면,측면 등 다양한 각도의 사진 데이터를 30장 정도 수집한다. (만약 필요하다면 100장까지는 수집할 예정)

기존연구/개발조사 결과

얼굴을 인식하여 자동으로 페이스북 태그, 사진앨범 분류, face ID 로 잠금화면 해제 등의 개발 사례가 있다.

Github repository URL : https://github.com/facetimee/facetime/blob/master/README.md

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.