yinguobing / cnn-facial-landmark

Training code for facial landmark detection based on deep convolutional neural network.
MIT License
626 stars 182 forks source link

Train with less points #94

Closed JGoncaloPereira closed 4 years ago

JGoncaloPereira commented 4 years ago

Hello, first of all congrats for the great work developing this method, i was able to create the TFrecord of my own dataset, however your model was made for 68 landmarks while the test im trying to make has only 7, can you help me understand the necessary procedures to make it work? I tried changing some things both in the model as in the code but it did not work. Anyways thanks for the time spent.

yinguobing commented 4 years ago

Generally speaking, you need to set the output of the model with the same number you expected, which is 7 * 2 in your case. This number should be consistent with the training and test file used.

JGoncaloPereira commented 4 years ago

Thank you so much, i did end up doing that and then i realized the mistake was another one, on my dataset. I have another question if possible though, while making the dataset i realized there were some images (i made my own dataset) that did not have all the landmarks visible, when this happens is there any specific layout on the annotations or the way the code is, its impossible to train with occluded landmarks? Thank you so much for the fast answer

yinguobing commented 4 years ago

In the post and code I published, all points out of the image were considered invalid and those samples were not used for training and validation.

In your case, occluded landmarks are still in the image(If I'm guessing right). I believe these samples are valid.

You can try training with that and see what happens.

JGoncaloPereira commented 4 years ago

Thank you so much, im gonna try that