Giter Club home page Giter Club logo

face_landmark_factory's People

Contributors

songhengyang avatar xuansan915 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

face_landmark_factory's Issues

Loading MobileNet has problem perhaps with the version inconsistency

Hello, my tensorflow version is 1.13rc0, keras version is 2.2.4 and opencv-version is 4.1.2. It is good when loading bigger cnn and squeezenet, but failed when loading mobilenet hdf5 file.
It reported:

Traceback (most recent call last):
File "test_webcam.py", line 81, in
webcam_main()
File "test_webcam.py", line 21, in webcam_main
mark_detector = MarkDetector(current_model, CNN_INPUT_SIZE)
File "E:\PythonSpace\face_landmark_factory-keras\face_landmark_factory-master\testing\mark_detector.py", line 46, in init
self.sess = tf.keras.models.load_model(mark_model)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\engine\saving.py", line 234, in load_model
model = model_from_config(model_config, custom_objects=custom_objects)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\engine\saving.py", line 324, in model_from_config
return deserialize(config, custom_objects=custom_objects)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\layers\serialization.py", line 64, in deserialize
printable_module_name='layer')
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 192, in deserialize_keras_object
list(custom_objects.items())))
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1263, in from_config
process_layer(layer_data)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\engine\network.py", line 1249, in process_layer
layer = deserialize_layer(layer_data, custom_objects=custom_objects)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\layers\serialization.py", line 64, in deserialize
printable_module_name='layer')
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\tensorflow\python\keras\utils\generic_utils.py", line 194, in deserialize_keras_object
return cls.from_config(cls_config)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\keras\engine\base_layer.py", line 1109, in from_config
return cls(**config)
File "E:\PythonSpace\face_landmark_factory-keras\face_landmark_factory-master\testing\utils.py", line 69, in init
self.depthwise_initializer = initializers.get(depthwise_initializer)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\keras\initializers.py", line 508, in get
return deserialize(identifier)
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\keras\initializers.py", line 503, in deserialize
printable_module_name='initializer')
File "E:\Users\admin\Anaconda3\envs\py3.6\lib\site-packages\keras\utils\generic_utils.py", line 138, in deserialize_keras_object
': ' + class_name)
ValueError: Unknown initializer: GlorotUniform

How can I try to fix problem and load mobilenet for testing?

Thanks & Regards!

train color image

hello author,

how can i train color images. i used is_gray = False while generating tf record file. but i get error while training the model

tensorflow.python.framework.errors_impl.InvalidArgumentError: Input to reshape is a tensor with 12288 values, but the requested shape has 4096
[[{{node Reshape}}]]
[[{{node IteratorGetNext}}]]

data augmentation

hello author,

the data augmentation generates the tf records, but the images and landmark folders are empty. can you help

thank you

训练的时候报错

history = parallel_model.fit(.......)这句话报错

AttributeError: 'BatchDataset' object has no attribute 'ndim'

correct_pad

In mobile_net_v2.py line 83 "from . import correct_pad" , where is this file? Thanks

Image preprocessing

Thanks for the high quality code, really nice setup!

I have a question related to the image preprocessing.
It seems that you never use the "preprocess_input" functions
So I guess you expect image between 0 and 255: It may reduce performance.

Furthermore when I use the facial_landmark_SqueezeNet network, the predictions do not really take into account the input.

I highly suspect the 2 problems to be related.

Thanks in advance

如何在300w数据集上测试?

感谢分享,我想请问一下,如果我使用300w数据集对网络进行训练,那如何使用300W测试集来测试精度?比如NME?期待您的回复

Custom dataset and points

@songhengyang @xuansan915 Hi thanks for an wonderful code , i had few queries

  1. Can train this more number of points like 192,168... etc . What all changes i have to make it run
  2. Can i train it on custom dataset , how many ideal number o fimages should i require to get good accuracy

thansk in advance

....

老哥,你这是神经网络直接输出68个点的坐标吗?我看了一下train_models.py的代码,发现好像只是简单的回归预测一下?谢谢回答哈

difference between landmark tensorflow implementation and openpose/tfpose for human pose estimation

hello author,

i have a query, how is this implementation different from tfpose which uses coco dataset and mobilenet model. i think this model predicts all the points even if some face parts are missing( if i cover my eyes or nose) it still detects right?
but it openpose/tf-pose if we cover the body parts, it wont show the keypoints. how is this different, can you give me some advice.

thank you

loss function error

hello author,

i get some error while training. please help.

edit: the images and landmark folders are empty while generating tfrecords. is it okay? but i get the train and validation tfrecords.

File "/home/rahul/rahul/face_landmark_factory-master/testing/utils.py", line 21, in smoothL1
x = K.switch(x < HUBER_DELTA, 0.5 * x ** 2, HUBER_DELTA * (x - 0.5 * HUBER_DELTA))

File "/home/rahul/anaconda3/envs/tensorflow/lib/python3.7/site-packages/tensorflow/python/framework/ops.py", line 1867, in _create_c_op
raise ValueError(str(e))
ValueError: Shape must be rank 0 but is rank 2 for 'loss/output_loss/cond/Switch' (op: 'Switch') with input shapes: [?,136], [?,136].

thank you

训练报错

请问训练是报错 val_loss did not improve from 161.33531并且报错KeyError: 'loss'是怎么回事呀,我直接预处理完成后运行的train_model.py

Introduction

If you want to generate a facial landmark model, that is it. This set of tools is very easy to use, you can train a model by yourself, test the model and get the result immediately.

Bug in augment script

Thanks for the good work!

Why does gen_augment.py produce a bigger test_tfrecord than train_tfrecord. I believe the test_tfrecord is supposed to be the train_tfrecord.

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.