hanluyt / gACNN_pytorch

Pytorch implementation of gACNN
3 stars 3 forks source link

模型中的patches #1

Open BettyMei opened 3 years ago

BettyMei commented 3 years ago

论文中提到pACNN是根据面部landmarks的位置,从最后一个feature maps中剪裁出感兴趣的24个patches,但是,论文中展示的是在原始图像(224x224)上的24个landmarks,我有个疑问,原始图像的维度和feature map的维度(28x28)不一致,这样的话,怎么保证在feature map上裁剪出的24个patches和原始图像上的landmarks对应上?

hanluyt commented 3 years ago

论文中提到pACNN是根据面部landmarks的位置,从最后一个feature maps中剪裁出感兴趣的24个patches,但是,论文中展示的是在原始图像(224x224)上的24个landmarks,我有个疑问,原始图像的维度和feature map的维度(28x28)不一致,这样的话,怎么保证在feature map上裁剪出的24个patches和原始图像上的landmarks对应上?

你好, 根据convolution和maxpooling的特性, 从原图224到28, 可以将原图上的facial landmarks的location进行除以8的操作, 进行局部区域的映射, 然后进行双线性插值

BettyMei commented 3 years ago

我看到代码中的处理了 “batch['landmarks'] / 8. + 6”,但是 “self.pad = nn.ReflectionPad2d(6)” 填充后的维度应该是宽高各增加12,这样的话放缩比例应该是 “batch['landmarks'] / 8. + 12”

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年9月1日(星期三) 下午3:47 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hanluyt/gACNN_pytorch] 模型中的patches (#1)

你好, 根据convolution和maxpooling的特性, 从原图224到28, 可以将原图上的facial landmarks的location进行除以8的操作, 进行局部区域的映射, 然后进行双线性插值

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

hanluyt commented 3 years ago

我看到代码中的处理了 “batch['landmarks'] / 8. + 6”,但是 “self.pad = nn.ReflectionPad2d(6)” 填充后的维度应该是宽高各增加12,这样的话放缩比例应该是 “batch['landmarks'] / 8. + 12” ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2021年9月1日(星期三) 下午3:47 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [hanluyt/gACNN_pytorch] 模型中的patches (#1) 你好, 根据convolution和maxpooling的特性, 从原图224到28, 可以将原图上的facial landmarks的location进行除以8的操作, 进行局部区域的映射, 然后进行双线性插值 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

可视化一下, 坐标原点在最左上角

David-on-Code commented 3 years ago

how do i get the dataset and process it? thank you very much to reply.

hanluyt commented 2 years ago

t? thank you very much to rep

how do i get the dataset and process it? thank you very much to reply.

This paper (https://ieeexplore.ieee.org/document/8576656) mentioned how to get the dataset