Closed glmanhtu closed 3 years ago
Hi @glmanhtu, glad you find this repo!
For the first question the answer is yes, you need to write some code to save the resized image and marks, and I recommand using FMD's universal
format which basicly save the marks in a json file, which is the default format this repo support. You can find out how the training data is constructed here:
And to export marks in an universal
format, check out this function:
For the second question, I need to clarify that the model was designed that way. It needs a proper input image to give correct facial landmarks. Most of the time a face detector is required to crop the target face area and send them as inputs for inference. If reading carefully you will find that all input images were randomly scaled, but, as you said they are still 'centered'. So randomly cropping the image as a way of data augmentation is promissing for giving a better model.
Awesome, thank you a lot
Tips: anyone interersted in resampling the dataset, please checkout this module:
Still, you need to write custom code if any preprocessing is required.
Hello @yinguobing, thank for your code.
One thing I'm not really understand about the creation of dataset for training. From your description, we need use the code in repository: https://github.com/yinguobing/face-mesh-generator to generate the 'Cropped' images, which is from this line: https://github.com/yinguobing/face-mesh-generator/blob/master/generate_heatmap_dataset.py#L131. So, I need to write some piece of code to save the 'image_resized' and 'mark_resized' somewhere else to constructing the dataset, is it correct ?
I see that you use the cropped and centered images as training data. However, for the real image, the face will not be in the center, therefore, I think this preprocessing will reduce the capability of the model isn't it ?