protossw512 / AdaptiveWingLoss

[ICCV 2019] Adaptive Wing Loss for Robust Face Alignment via Heatmap Regression - Official Implementation
Apache License 2.0
395 stars 88 forks source link

Why does the output have one more channel than the num of landmarks? #13

Open ty2806 opened 4 years ago

ty2806 commented 4 years ago

In your code of the model you have

self.add_module('l' + str(hg_module), nn.Conv2d(256, num_landmarks+1, kernel_size=1, stride=1, padding=0))

and in evaler.py the last channel isn't used

pred_heatmap = outputs[-1][:, :-1, :, :][i].detach().cpu()

So I guess it's used somewhere in the loss?

ty2806 commented 4 years ago

I just read the paper again and now my understanding is the additional channel of the heatmap output is a heatmap of face boundery and is used as a part of the adaptive wing loss.

And your model also has a boundery_channels output which I think is the x-, y- bounderies generated from coordinate channels. now my question is what loss is used for this boundery output?