Git Product home page Git Product logo

docface's People

Contributors

nicolas-raoul avatar seasonsh 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

docface's Issues

How to do the model parallelism ?

Great Work !
I found that the code works well on multiple gpu training but only for the data parallelism.
However, it is hard to train a model with the classes more than 10 million or even more. In that case,
the model parallelism should solve the problem. I was doing the implementations but the diam softmax may seriously interfere the model parallelism. Could you give the solutions or any idea ?

how can I get the Public IvS dataset?

hello, the paper mentioned the Public IvS dataset and some other paper used the dataset for training; so I want to ask where can I get the Public IvS dataset?

How to Run DocFace fine tuning on CPU

Python: 3.6.9
Tensorflow: 1.8

I am trying to run the
python src/train_sibling.py config/finetune.py

with setting num_gpus = 0

But I see that the code is written for running on GPU's only.

Also getting the following error when trying to run.

Traceback (most recent call last):
  File "src/train_sibling.py", line 124, in <module>
    main(args)
  File "src/train_sibling.py", line 45, in main
    network.initialize(config, trainset.num_classes)
  File "/home/zero/PycharmProjects/DocFace/src/sibling_net.py", line 60, in initialize
    image_splits = tf.split(image_batch_placeholder, config.num_gpus)
  File "/home/zero/PycharmProjects/DocFace/venv/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1391, in split
    axis=axis, num_split=num_or_size_splits, value=value, name=name)
  File "/home/zero/PycharmProjects/DocFace/venv/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 7709, in split
    "Split", split_dim=axis, value=value, num_split=num_split, name=name)
  File "/home/zero/PycharmProjects/DocFace/venv/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 708, in _apply_op_helper
    (key, op_type_name, attr_value.i, attr_def.minimum))
ValueError: Attr 'num_split' of 'Split' Op passed 0 less than minimum 1.

Is there any way for me to run it on CPU? @nicolas-raoul @seasonSH

the weight imprinting implement question

thanks for the excellent work !
I try to implement your work in pytorch. When I implement the weight imprinting, i set the learning rate of the classifier layer to 0. then i use the follow steps:
1、calculate the features and normalize them as the weight vecotors.
2、replace the old weight vector
3、calculate the loss use am softmax
4、backward gradients and update weights except the classifier layer.

is it correct ?
i am not familiar with the tensorflow , so i don't understand your code very well.
please give me some advices, thanks !

How to create lfw_pairs.txt

10 300
Abel_Pacheco 1 4
Akhmed_Zakayev 1 3
Akhmed_Zakayev 2 3
Amber_Tamblyn 1 2
Can you explain how it was generated?

How to perform the final verification/classification?

Hi,

The guideline has provided the way to extract features for test images. But how to verify if two images belong to the same person or not? To calculate the distance between the extracted features? Can the pre-trained/fine-tuned network be used to output the probability of that?

Many thanks!

base model training without se

Hi, I am currently training the base model without se-module. The reg_loss decreased from 1.031 to 0.065 while the am loss seems stay at 16.287. Isn't training without Se-module just by commenting out the following part:
if i % 2 == 1:
net = se_module(net)
net = net + shortcut
shortcut = net
print('| shortcut')
at the face_resnet.py ? Would you please help me? Thank you.

pair loss

seems the mps loss described in the paper is not the same with the code, which one is the right one?

about MPS loss

hi, seasonSH
thanks for your work.
I use the MPS loss, when I train the model, the loss is allways about 0.5, is it right ? what is the final loss when using the MPS loss ?

queue().empy!

Hi: @seasonSH Yichun
thank you for your work .i trained the base model,how can i do?

essing/queues.py", line 105, in get
    raise Empty
queue.Empty
Process Process-3:
Traceback (most recent call last):
  File "/home/a302/laojiu/anaconda3/envs/tensorflow1.2.0/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/home/a302/laojiu/anaconda3/envs/tensorflow1.2.0/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/a302/laojiu/github/DocFace/src/utils.py", line 245, in batch_queue_worker
    batch = self.get_batch(config.batch_size, config.batch_format)
  File "/home/a302/laojiu/github/DocFace/src/utils.py", line 202, in get_batch
    indices_batch.extend(self.index_queue.get(block=True, timeout=30))
  File "/home/a302/laojiu/anaconda3/envs/tensorflow1.2.0/lib/python3.6/multiprocessing/queues.py", line 105, in get
    raise Empty
queue.Empty
Traceback (most recent call last):
  File "src/train_base.py", line 111, in <module>
    main(args)
  File "src/train_base.py", line 80, in main
    batch = trainset.pop_batch_queue()
  File "/home/a302/laojiu/github/DocFace/src/utils.py", line 260, in pop_batch_queue
    batch = self.batch_queue.get(block=True, timeout=60)
  File "/home/a302/laojiu/anaconda3/envs/tensorflow1.2.0/lib/python3.6/multiprocessing/queues.py", line 105, in get
    raise Empty
queue.Empty
(tensorflow1.2.0) a302@a302-DGX-Station:~/laojiu/github/DocFace$ 
``` @

how to debug your code?

Hi , thanks for sharing your work. I want to train my traindataset but the error appeared all the time ,then I debug the code and the following text always extists . Can you tell me how to debug?
"usage: train_base.py [-h] config_file
train_base.py: error: the following arguments are required: config_file"

java error

i transfer it to pb,when i run it in java it encouter problems. i try the model facenet with pb file and success.so i am confused that weather docface model can run in java?
Exception in thread "main" java.lang.RuntimeException: Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero
[[{{node None/FaceResNet/NetA_1/conv2/SE/Flatten/flatten/Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](None/FaceResNet/NetA_1/conv2/SE/AvgPool2D/AvgPool, None/FaceResNet/NetA_1/conv2/SE/Flatten/flatten/Reshape/shape)]]
at com.umetrip.cv.service.TFTest.performInference(TFTest.java:64)
at com.umetrip.cv.service.TFTest.main(TFTest.java:26)
Caused by: java.lang.IllegalArgumentException: Reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero
[[{{node None/FaceResNet/NetA_1/conv2/SE/Flatten/flatten/Reshape}} = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](None/FaceResNet/NetA_1/conv2/SE/AvgPool2D/AvgPool, None/FaceResNet/NetA_1/conv2/SE/Flatten/flatten/Reshape/shape)]]
at org.tensorflow.Session.run(Native Method)
at org.tensorflow.Session.access$100(Session.java:48)
at org.tensorflow.Session$Runner.runHelper(Session.java:314)
at org.tensorflow.Session$Runner.run(Session.java:264)
at com.umetrip.cv.service.TFTest.performInference(TFTest.java:58)
... 1 more

public IvS data?

Thank you for your codes! Can you please share public IvS dataset? I couldn't find it.

diam implement question

hi, seasonSH:
thanks for your work.
in your implementaion, the config of diam is:

Loss functions and their parameters.

losses = {
'diam': {'scale': 'auto', 'm': 5.0, 'alpha':1.0}
}
but the in the am-softmax paper, the m is about 0.35, so, my question is why in your implemention the m is set to 5, it's much larger than the origin am-softmax paper setting ?
Looking forward for your replay !

FaceResNet arch is different from the referenced paper?

Looking at the code, why is there an SE module and why was it not referenced in the DocFace paper?, From my limited understanding of tf-slim, does the following

            with slim.arg_scope([slim.batch_norm, slim.dropout], is_training=phase_train):
                print('input shape:', [dim.value for dim in images.shape])
                
                net = conv_module(images, 0, [32, 64], scope='conv1')
                print('module_1 shape:', [dim.value for dim in net.shape])

                net = conv_module(net, 2, [64, 128], scope='conv2')
                print('module_2 shape:', [dim.value for dim in net.shape])

                net = conv_module(net, 4, [128, 256], scope='conv3')
                print('module_3 shape:', [dim.value for dim in net.shape])

                net = conv_module(net, 10, [256, 512], scope='conv4')
                print('module_4 shape:', [dim.value for dim in net.shape])

                net = conv_module(net, 6, [512], scope='conv5')
                print('module_5 shape:', [dim.value for dim in net.shape])

actually use batch_norm and dropout in the model at all? How does the model know when and where to create the mentioned layers?

How to test model??

How to test the model, cause i can't find any test script. Sorry still quite a noob in machine learning.

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.