Hzzone / PseCo

(CVPR 2024) Point, Segment and Count: A Generalized Framework for Object Counting
77 stars 6 forks source link

init() got an unexpected keyword argument 'print_freq' #12

Closed lichen14 closed 2 months ago

lichen14 commented 2 months ago

https://github.com/Hzzone/PseCo/blob/e68019ae6ec3c5401f62f2553721915d4325c335/fscd_lvis/4_1_train_roi_head.py#L79

Hi, it seems that the wandb.init() has no attribute 'print_freq'?

Is there any wrong?

lichen14 commented 2 months ago

请原谅我直接用中文了 https://github.com/Hzzone/PseCo/blob/e68019ae6ec3c5401f62f2553721915d4325c335/fsc147/4_1_train_roi_head.py#L116

https://github.com/Hzzone/PseCo/blob/e68019ae6ec3c5401f62f2553721915d4325c335/fsc147/4_1_train_roi_head.py#L250

这里使用了all_data[fname]的['example_clip_features']属性,但是我实际按照您给的代码顺序,跑完 https://github.com/Hzzone/PseCo/blob/e68019ae6ec3c5401f62f2553721915d4325c335/fsc147/1_generate_data.ipynb 的In [38] '' torch.save(all_data, f'{project_root}/data/fsc147/sam/all_data_vitl.pth') '' 时,保存的all data 并无example_clip_features属性。

example_clip_features属性真正出现在该第一步文件的In [66] 中,但此时已经没有更新all data的保存。

因此,我有两个问题:

  1. 我是否需要保存In [66] 中的all data 作为all_data_vith.pth? 然后在第四步中才能正常使用?
  2. 诸如此类的,我在复现过程中出现很多不该出现的bug。鉴于这篇论文发表在了CVPR,我猜想作者是否能够检查此类bug,之后上传可以运行的版本?或者也请修改readme,使其符合实际的文件名

一些小的建议或者疑问,仅供您参考 :)

Hzzone commented 2 months ago

你好:

  1. 第一个是开源的时候没有替换掉logger,把这个参数删了就行,不影响训练,这个问题是由于wandb 版本的问题,我的版本可以传非wandb参数的;
  2. 这个跑完之后应该和我传的数据一样,生成example features之后,应该多一行重新torch.save。
  3. 开源之前我测试过训练没问题: ) 这两个问题,都不难解决