Git Product home page Git Product logo

project-arcface's Introduction

[Project] Korean Face Classification

Korean Face Classification Model by Arcface

dataset

data preprocessing

  • 한 사람당 image가 32,400장으로 너무 많아 L1(조명-ㅣLux1000), S001(액세서리-보통), E01~E03(표정) 데이터만 사용하기로 함(1인당 train 40, test 20)
  • ms1m_align_112 데이터가 가로,세로 모두 112pixel로 얼굴만 detection한 이미지이므로 k-face 데이터셋도 얼굴만 detection하여 저장함

    compare datasets
  • ms1m_align_112 dataset이 데이터 수도 많고, 정면 얼굴도 많아 k-face dataset과 확연히 비교가 됨.

  • k-face dataset에서 조명을 다양하게 하고, 수를 늘리는 재작업 수행
  • 조명(L1, L2, L3), 액세서리(S001, S002, S005), 방향(C5~C10), 표정(E1, E2, E3) 데이터 사용(1인당 train 132, test 30)
  • face detection 할 때 ms1m dataset과 비교하여 눈,코,입 부분만을 검출하거나 입이 잘리는 이미지가 있어 box크기를 조절함. 132images

4. Variety Image : random으로 이미지에 톤의 변화를 줌.

  • Gammma_LUD방법을 사용하여 hue, satuationr값을 랜덤으로 조절

5. trian data : tensorflow에서 빠르게 training 하기 위해 tfrecord 파일 만들기

- slm_align_112 데이터: 85,742명, 5,822,653장 - K-face 데이터 : 400명, 49,491장 (52,800장을 기대했으나 face detection하면서 이미지가 줄어듦.) - **test시에는 더 성능이 좋은 face detection model을 사용해야겠음** - 모두 86,142폴더, 5,872,144장 이미지 준비

6. test data : K-face test set 만들기

- arcface-tf2 에서 사용한 lwf, AgeDB, cfp dataset 과 함께 k-face을 사용하기 위해 K-face set도 다른 데이터셋과 같은 구조로 만듦.

  • train data와 같이 얼굴을 찾아 112 * 112로 조절
  • file rename: 파일 이름을 폴더명(사람 이름)_0001.jpeg로 rename
  • [k-face_pairs.txt 생성]: 같은 사람의 사진 pairs와 다른 사람의 사진 paris 를 표기한 txt 파일 생성
  • k-face.bin 생성 : kface_prairs.txt 파일을 가지고 kface.bin 파일 생성
  • k_face.lst 파일 생성
  • k_face.rec, k_face.idx 파일 생성
  • k_face.bin 파일 생성
  • 위에서 만든 .rec, .idx, .bin 파일을 한 폴더에 정리하기

train/test

0. [ordinary_train] : k-face dataset을 추가하기 전의 학습

general train pram test pram
barch_size 128 binary_img True mode fit
input_size 112 num_classes 85,742 loss Softmax
embd_size 512 num_samples 5,822,653 data acc
sub_name 'arc-res50' epochs 5 lfw 0.9710
back_bone 'ResNet50' base_lr 0.01 AgeDB-30 0.8520
head_type ArcHead w_decay float 5e-4 CFP-FP 0.8757
is_ccrop False save_steps 1000 k-face None
  • 모델 : 참고한 ArcFace의 모델의 구조 , 하이퍼 파라미터 등을 그대로 학습
  • 데이터: Ms1m data + K-face data : 400명, 49,491장을 추가하여 학습

general train pram test pram
barch_size 128 binary_img True mode fit
input_size 112 num_classes 86,142 loss Softmax
embd_size 512 num_samples 5,872,144 data acc
sub_name 'arc-res50' epochs 5 lfw 0.9705
back_bone 'ResNet50' base_lr 0.01 AgeDB-30 0.8560
head_type ArcHead w_decay float 5e-4 CFP-FP 0.8817
is_ccrop False save_steps 1000 k-face 0.5652

reference

project-arcface's People

Contributors

shiney5213 avatar jeongnamho avatar

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.