Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

已解决 #20

Open
lijinStudy opened this issue Oct 31, 2022 · 8 comments
Open

已解决 #20

lijinStudy opened this issue Oct 31, 2022 · 8 comments

Comments

@lijinStudy
Copy link

No description provided.

@lijinStudy lijinStudy changed the title 你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2),求解答 你好 Oct 31, 2022
@lijinStudy lijinStudy changed the title 你好 已解决 Oct 31, 2022
@wfs123456
Copy link
Owner

wfs123456 commented Oct 31, 2022 via email

@lijinStudy
Copy link
Author

注意model.py的输出维度

---原始邮件--- 发件人: @.> 发送时间: 2022年10月31日(周一) 晚上9:40 收件人: @.>; 抄送: @.>; 主题: [wfs123456/CCTrans] 你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2),求解答 (Issue #20) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.>

感谢回复,代码现已正常运行。想再请教您一个问题,在train_helper.py文件的val_epoch函数内,crop_pred = (F.interpolate())中的h8,w8以及除以64,是和输出特征的大小有关吗?由于输出特征图大小为原始图像下采样8倍,因此要h和w都乘8。如若输出特征图大小为原始图像下采样4倍,则是将代码改为h4,w4以及除以16,请问我的理解是否有误呢?期待您的回复

@wfs123456
Copy link
Owner

wfs123456 commented Nov 2, 2022 via email

@ljc108
Copy link

ljc108 commented Nov 25, 2022

@lijinStudy
你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2)

请问这个问题你怎么解决的

@lijinStudy
Copy link
Author

@lijinStudy 你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2)

请问这个问题你怎么解决的

注意把model.py的输出预测密度图size和真实密度图size对齐,比果你的output_size是input_size的1/4,那么就要将train_helper.py的downsample_ratio设置为4。

@ljc108
Copy link

ljc108 commented Nov 26, 2022

@lijinStudy 你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2)

请问这个问题你怎么解决的

注意把model.py的输出预测密度图size和真实密度图size对齐,比果你的output_size是input_size的1/4,那么就要将train_helper.py的downsample_ratio设置为4。

谢谢了

@lijinStudy
Copy link
Author

预测密度图的积分和代表预测人数,,但预测密度图的大小为1/8,那每个像素值就会相应的缩小,为了保证积分和不变,,需要对每个像素值放大 88 ,也就是64倍,,,,你的输出为1/4,,那确实是放大44,即16倍

---原始邮件--- 发件人: @.> 发送时间: 2022年11月2日(周三) 晚上10:26 收件人: @.>; 抄送: @.@.>; 主题: Re: [wfs123456/CCTrans] 已解决 (Issue #20) 注意model.py的输出维度 … ---原始邮件--- 发件人: @.> 发送时间: 2022年10月31日(周一) 晚上9:40 收件人: @.>; 抄送: @.>; 主题: [wfs123456/CCTrans] 你好,在运行train.py时,报了AssertionError,指向的是以下这一行 assert self.output_size == normed_density.size(2),求解答 (Issue #20) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.> 感谢回复,代码现已正常运行。想再请教您一个问题,在train_helper.py文件的val_epoch函数内,crop_pred = (F.interpolate())中的h8,w8以及除以64,是和输出特征的大小有关吗?由于输出特征图大小为原始图像下采样8倍,因此要h和w都乘8。如若输出特征图大小为原始图像下采样4倍,则是将代码改为h4,w4以及除以16,请问我的理解是否有误呢?期待您的回复 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

大佬你好,再打扰你一下,请问你有复现过Paper的损失函数吗。

@ljc108
Copy link

ljc108 commented Dec 29, 2022

没有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants