In recent years, benefiting from deep convolutional neural networks (DCNNs), face parsing has developed rapidly. However, it still has the following problems: (1) Existing state-of-the-art frameworks usually do not satisfy real-time while pursuing performance; (2) Similar appearances cause incorrect pixel label assignments, especially in the boundary; (3) To promote multi-scale prediction, deep features and shallow features are used for fusion without considering the semantic gap between them. To overcome these drawbacks, we propose an effective and efficient hierarchical aggregation network called EHANet for fast and accurate face parsing. More specifically, we first propose a Stage Contextual Attention Mechanism (SCAM), which uses higher-level contextual information to re-encoding the channel according to its importance. Secondly, a Semantic Gap Compensation Block (SGCB) is presented to ensure the effective aggregation of hierarchical information. Thirdly, the advantages of weighted boundary-aware loss effectively make up for the ambiguity of boundary semantics. Without any bells and whistles, combined with a lightweight backbone, we achieve outstanding results on both CelebAMask-HQ (78.19% mIoU) and Helen datasets (90.7% F1-score). Furthermore, our model can achieve 55 FPS on a single GTX 1080Ti card with 640 x 640 input and further reach over 300 FPS with a resolution of 256 x 256, which is suitable for real-world applications.
guanweidong/FaceParsing
EHANet: An effective hierarchical aggregation network for face parsing
PythonMIT