ZhenglinZhou / STAR

[CVPR 2023] STAR Loss: Reducing Semantic Ambiguity in Facial Landmark Detection
157 stars 17 forks source link

params and flops of the model #9

Closed HitBadTrap closed 1 year ago

HitBadTrap commented 1 year ago

你好!我对这篇工作十分感兴趣,想在自己的文章中引用,利用你提供框架,我测得的params=17.18 M,flops=17.52 GMac,请问是否与你测得的相一致呢?

HitBadTrap commented 1 year ago

09575abd34daba5d661dd48bbebd1f9 这是测试的代码

HitBadTrap commented 1 year ago

其他的设置使用的是repo里默认的参数

ZhenglinZhou commented 1 year ago

您好 @HitBadTrap ,感谢您对我们工作的兴趣!

我们论文中所报的结果是params=13.37 M,该结果可通过以下代码复现:

from thop import profile

print('Results from thop.profile')
input = torch.randn(1, 3, 256, 256).cuda()
flops, params = profile(net, inputs=(input,))
print('FLOPs = ' + str(flops / 1000 ** 3) + 'G')
print('Params = ' + str(params / 1000 ** 2) + 'M')

结果如下:

image
更多结果: Datasets Params (MB) FLOPs (G)
WFLW 13.48 17.49
300W 13.37 17.05
COFW 13.23 16.46

如果您还有其他问题,欢迎联系我们。