人脸超分辨率,基于迭代合作的方法
01
通过低分辨率图片LR或者粗超分辨率图片SR得到的人脸先验信息不一定准确 大部分方法使用人脸先验的方式为简单的 concatenate 操作,不能充分利用先验信息
02
return heatmap.detach() if detach else heatmap
elif heatmap.size(1) == 68:
new_heatmap = torch.zeros_like(heatmap[:, :5])
new_heatmap[:, 0] = heatmap[:, 36:42].sum(1) # left eye
new_heatmap[:, 1] = heatmap[:, 42:48].sum(1) # right eye
new_heatmap[:, 2] = heatmap[:, 27:36].sum(1) # nose
new_heatmap[:, 3] = heatmap[:, 48:68].sum(1) # mouse
new_heatmap[:, 4] = heatmap[:, :27].sum(1) # face silhouette
return new_heatmap.detach() if detach else new_heatmap
elif heatmap.size(1) == 194: # Helen
new_heatmap = torch.zeros_like(heatmap[:, :5])
tmp_id = torch.cat((torch.arange(134, 153), torch.arange(174, 193)))
new_heatmap[:, 0] = heatmap[:, tmp_id].sum(1) # left eye
tmp_id = torch.cat((torch.arange(114, 133), torch.arange(154, 173)))
new_heatmap[:, 1] = heatmap[:, tmp_id].sum(1) # right eye
tmp_id = torch.arange(41, 57)
new_heatmap[:, 2] = heatmap[:, tmp_id].sum(1) # nose
tmp_id = torch.arange(58, 113)
new_heatmap[:, 3] = heatmap[:, tmp_id].sum(1) # mouse
tmp_id = torch.arange(0, 40)
new_heatmap[:, 4] = heatmap[:, tmp_id].sum(1) # face silhouette
return new_heatmap.detach() if detach else new_heatmap
else:
raise NotImplementedError('Fusion for face landmark number %d not implemented!' % heatmap.size(1))
03
04
论文链接:
https://arxiv.org/pdf/2003.13063.pdf
项目链接:
https://github.com/Maclory/Deep-Iterative-Collaboration
备注:人脸
人脸技术交流群
人脸检测、识别、对齐、重建、表情识别、表情迁移等技术,
若已为CV君其他账号好友请直接私信。
在看,让更多人看到
赞 (0)