deepinsight / insightface

State-of-the-art 2D and 3D Face Analysis Project
https://insightface.ai
23.22k stars 5.4k forks source link

How to train your own datasets? #1503

Open RuoyuChen10 opened 3 years ago

RuoyuChen10 commented 3 years ago

Thanks for your work, it's a great project.

However, it's unclear to train the own datasets.

I find can using face2rec2.py to generate datasets for training, however, could you offer a document details describle how to make the own datasets? Because the project changed a lot and I have no idea how to train the own datasets.

Thanks, looking forward to your reply.

tianxianhao commented 3 years ago

This is a essiential issue! I find the similar code of face2rec.py in the tutorial of mxnet. https://cv.gluon.ai/build/examples_datasets/recordio.html https://github.com/apache/incubator-mxnet/blob/master/tools/im2rec.py This is more clear to read. I suggest that you can follow the tutorail to make some modification on im2rec.py, and then replace the train_dataiter in train.py by mx.io.ImageRecordIter. And I success train model with my own dataset.

tianxianhao commented 3 years ago

Another links maybe helpful for you. https://blog.csdn.net/m0_37192554/article/details/100670608

ghost commented 3 years ago

Another links maybe helpful for you. https://blog.csdn.net/m0_37192554/article/details/100670608

can you give me the config you've trained?

watertianyi commented 3 years ago

@tianxianhao @nhutsam261 ,The format tool uses labelme, and the format is json. How to convert your face data set into a more extensive format described by the author for training?

tianxianhao commented 3 years ago

please make sure you have a good understand on the file of im2rec.py!  after that you will know how to build your own dataset.

--------------原始邮件-------------- 发件人:"jimi @.>; 发送时间:2021年7月31日(星期六) 下午5:13 收件人:"deepinsight/insightface" @.>; 抄送:"tianxianhao @.>;"Mention @.>; 主题:Re: [deepinsight/insightface] How to train your own datasets? (#1503)

@tianxianhao @nhutsam261 ,The format tool uses labelme, and the format is json. How to convert your face data set into a more extensive format described by the author for training?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

ghost commented 3 years ago

@tianxianhao @nhutsam261 ,The format tool uses labelme, and the format is json. How to convert your face data set into a more extensive format described by the author for training?

you can see this one https://github.com/deepinsight/insightface/issues/791#issuecomment-511108136 or you can follow my repo: https://github.com/nhutsam261/faceid-processing.git

watertianyi commented 3 years ago

@nhutsam261 I didn’t make it clear, what I’m going to do now is how to label the face detection data set into a widerFace format.

ghost commented 3 years ago

@nhutsam261 I didn’t make it clear, what I’m going to do now is how to label the face detection data set into a widerFace format.

You should be understand insightface format

watertianyi commented 3 years ago

@nhutsam261 I'm talking about how to make a face detection data set, not a face recognition data set, especially how to make a RetinaFace face key point data set, and how to use my own data set to generate a data set in a format like widerFace?