mtcnn icon indicating copy to clipboard operation
mtcnn copied to clipboard

how to crop the face

Open yekeping opened this issue 8 years ago • 10 comments

how to crop the face

yekeping avatar Feb 03 '17 13:02 yekeping

You mean to get face roi from the image? If so, the below code may help.

face_roi = img[y:y+height, x:x+width]

DuinoDu avatar Feb 04 '17 04:02 DuinoDu

I mean when you finish the task of detecting and alignment of the given face.how can I crop the face acoording the bounding box and save the result before the task of the recognization of the face

yekeping avatar Feb 09 '17 06:02 yekeping

你是指分割出人脸吗?

DuinoDu avatar Feb 09 '17 06:02 DuinoDu

是的,就是把人脸分割出来,还有,这个仓库的代码能进行人脸对齐么,如果一个文件夹内很多人的图片,进行人脸对齐是按照第一个人的人脸进行对齐么

yekeping avatar Feb 09 '17 07:02 yekeping

我只改写了人脸检测的部分,在matlab版本里面有对齐的部分,issue里有另一个同学添加了显示对齐部分的代码

DuinoDu avatar Feb 09 '17 07:02 DuinoDu

https://github.com/kpzhang93/MTCNN_face_detection_alignment

亲,你说的matlab版本是这个么,我在里面怎么没找到人脸对齐部分的代码,我qq 1445033890,能加个qq指导下学渣么

yekeping avatar Feb 09 '17 07:02 yekeping

哈哈,好喜欢这种一言不合就用中文的感觉

pkjq11 avatar May 02 '17 07:05 pkjq11

Haven't found the code for face alignment based on the five detected landmarks. Plz show me where it is. THX! @DuinoDu @yekeping

ycsun19 avatar Jul 24 '17 03:07 ycsun19

@ycsun19 可以用skimage的相似变换skimage.transform.estimate_transform('similarity',dst,src),参考https://github.com/ydwen/caffe-face/blob/caffe-face/face_example/extractDeepFeature.m 中用的相似变换处理mtcnn输出的五点

pangdegui avatar Aug 01 '17 05:08 pangdegui

你好,对训练有点疑问,在训练的时候,每一个batch_size是只训练一种任务吗,比如分类或者box_reg,或者landmark。还是说每个batch_size里面,这几个任务都包含了,然后里面的数据分布是按照一定的比例来的。

ouguozhen avatar Apr 25 '18 07:04 ouguozhen