Coder Social home page Coder Social logo

bruceyang2012 / face-identification-with-cnn-triplet-loss Goto Github PK

View Code? Open in Web Editor NEW
46.0 3.0 17.0 23 KB

Face identification with cnn+triplet-loss written by Keras.

Jupyter Notebook 63.95% Python 36.05%
face-identification face-recognition cnn keras

face-identification-with-cnn-triplet-loss's Introduction

Description

This is a implementation of cnn+triplet-loss for face identification written by keras, which is the last step of my FaceID system. You can find another two repositories as follows:

  1. Face-detection-with-mobilenet-ssd
  2. Face-Alignment-with-simple-cnn
  3. Face-identification-with-cnn-triplet-loss

prepare data

  1. Download caltech faces from Official Website , and put it into face_data folder in organize_data.py.
  2. Run organize_data.py to generate train, test, dev data.
  3. Run load_data.py to generate train_x.npy, train_y.npy and so on.

train

Follow face_train.ipynb step by step. You can change the parameters for better performance.

to do

Compare with center loss.

References

meownoid/face-identification-tpe

face-identification-with-cnn-triplet-loss's People

Contributors

bruceyang2012 avatar zjuyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

face-identification-with-cnn-triplet-loss's Issues

Regarding orgnised_data.py and load_data.py

  1. After organise_data.py, it blown up 451 images into tons of thousands images, which I think you are trying to increase dataset, that's ok. What I dun understand is why in each subject folders, it contains different faces? Am I correct to say, in real cases, each subject folder should ONLY contain images of that individual? Example: Subject_Bruce folder contains only bruce images... and so on . Same question to Test folder too.

  2. Is it mandatory to have each subject folders to have the same number of images?

  3. In load_data.py, the generation of train and test npy, estimated to take 20hours. Did u got this too or its just me? I had to modify from float32 to float16, else it will throw memory error.

tpe, tpe_pred = build_tpe(n_in, n_out, W_pca.T)

HI I'm stuck here.
keras merge keep error me out.

In [13]: tpe, tpe_pred = build_tpe(n_in, n_out, W_pca.T)
D:\xrvision\XRV_projects\Face-identification-with-cnn-triplet-loss\model.py:67: UserWarning: Update your Dense call to the Keras 2 API: Dense(18, input_dim=18, weights=[array([[-..., activation="linear", use_bias=False)
base_model.add(Dense(n_out, input_dim=n_in, bias=False, weights=[W_pca], activation='linear'))
Traceback (most recent call last):

File "", line 1, in
tpe, tpe_pred = build_tpe(n_in, n_out, W_pca.T)

File "D:\xrvision\XRV_projects\Face-identification-with-cnn-triplet-loss\model.py", line 75, in build_tpe
e = merge([a_emb, p_emb, n_emb], mode=triplet_merge, output_shape=triplet_merge_shape)

TypeError: 'module' object is not callable

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.