Coder Social home page Coder Social logo

local-crowd-counting's People

Contributors

ijcai20-paper-code avatar xiyang1012 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

local-crowd-counting's Issues

how to train models

Thanks for the great code!
I succeeded in executing demo.py and successfully estimated the number of people with my own image. Wonderful.

I would like to know how this model (QNRF_mae_86.61_mse_152.19.pth) was trained.

thanks.

大佬,完整源码什么时候能放出来?

我是一个入门级学徒,调试代码只能进行到使用大佬发出来的训练好的QNRF模型进行预测的程度。想更近一步学习大佬的代码。请问什么时候能放出源码?

关于在SHPartA中复现论文的问题

大佬好,因为看到这篇是基于C3框架的论文,我就把C3中的train.py和train-config搬过来了,参数都是按照论文中设置Epoch=400,lr=1e-5,bz=1,
问题一:然后训练后发现一百多个epoch就MAE最低到214(Adam),200(SGD),之后就一直在MAE200到300间浮动,怎么也降不下来,我改动了您SHHA.py中加了一个 den = den.transpose()
def read_image_and_gt(self, fname):
img = Image.open(os.path.join(self.img_path, fname))
if img.mode == 'L':
img = img.convert('RGB')

    den = pd.read_csv(os.path.join(self.gt_path,os.path.splitext(fname)[0] + '.csv'), sep=',',header=None).values
    den = den.astype(np.float32, copy=False)
    den = den.transpose()
    den = Image.fromarray(den)

    return img, den

因为发现Image.fromarray读进来后会使得HW相反,但是这样改动之后可以训练了,但是就会出现前面说的mae降不下来的问题,想问问具体原因在哪呢,Adam 优化的时候MAE最低214 val loss 4.16左右
问题二:最好的表现模型VGG16_LCM_Regression在定义 #SAM scale-aware-module模块中的Maxout函数似乎与原文中的以四个膨胀卷纪率1234卷积再concat得操作好像不太一样,我将您注释的代码concat的还原了一下好像size无法匹配,还是太菜了,没理解这块的原理,球球大佬解释一下呀!!
def Maxout(x1, x2, x3, x4):
mask_1 = torch.ge(x1, x2)
mask_1 = mask_1.float()
x = mask_1 * x1 + (1-mask_1) * x2

mask_2 = torch.ge(x, x3)
mask_2 = mask_2.float()
x = mask_2 * x + (1-mask_2) * x3

mask_3 = torch.ge(x, x4)
mask_3 = mask_3.float()
x = mask_3 * x + (1-mask_3) * x4
return x

想问下这里的troch.ge比较前后两个变量的大小输出0/1,没想明白具体是啥意思,大佬可以解释下吗
最后大佬可以加一波微信或者qq或者邮件私聊我吗,最近一直在想复现这篇论文问题具体出在那里了,实在是找不到问题,很着急,像热锅上的蚂蚁,拜托大佬可以赐教一波!!
我的微信:knightyxp qq:377525381 email:[email protected]

Unexpected key(s) in state_dict

Hi there! Congratulations on your publication. I'm getting the following error when trying to run test.py. Can you kindly guide me what am I doing wrong here?

RuntimeError: Error(s) in loading state_dict for CrowdCounter:
Missing key(s) in state_dict: "CCN.layer3.0.weight", "CCN.layer3.0.bias", "CCN.layer3.2.weight", "CCN.layer3.2.bias", "CCN.layer3.5.weight", "CCN.layer3.5.bias", "CCN.layer3.7.weight", "CCN.layer3.7.bias", "CCN.layer3.10.weight", "CCN.layer3.10.bias", "CCN.layer3.12.weight", "CCN.layer3.12.bias", "CCN.layer3.14.weight", "CCN.layer3.14.bias", "CCN.layer3.17.weight", "CCN.layer3.17.bias", "CCN.layer3.19.weight", "CCN.layer3.19.bias", "CCN.layer3.21.weight", "CCN.layer3.21.bias", "CCN.layer4.1.weight", "CCN.layer4.1.bias", "CCN.layer4.3.weight", "CCN.layer4.3.bias", "CCN.layer4.5.weight", "CCN.layer4.5.bias", "CCN.layer5.1.weight", "CCN.layer5.1.bias", "CCN.layer5.3.weight", "CCN.layer5.3.bias", "CCN.layer5.5.weight", "CCN.layer5.5.bias", "CCN.fuse_layer5.conv1x1_d1.weight", "CCN.fuse_layer5.conv1x1_d1.bias", "CCN.fuse_layer5.conv1x1_d2.weight", "CCN.fuse_layer5.conv1x1_d2.bias", "CCN.fuse_layer5.conv1x1_d3.weight", "CCN.fuse_layer5.conv1x1_d3.bias", "CCN.fuse_layer5.conv1x1_d4.weight", "CCN.fuse_layer5.conv1x1_d4.bias", "CCN.fuse_layer5.conv_d1.weight", "CCN.fuse_layer5.conv_d1.bias", "CCN.fuse_layer5.conv_d2.weight", "CCN.fuse_layer5.conv_d2.bias", "CCN.fuse_layer5.conv_d3.weight", "CCN.fuse_layer5.conv_d3.bias", "CCN.fuse_layer5.conv_d4.weight", "CCN.fuse_layer5.conv_d4.bias", "CCN.fuse_layer4.conv1x1_d1.weight", "CCN.fuse_layer4.conv1x1_d1.bias", "CCN.fuse_layer4.conv1x1_d2.weight", "CCN.fuse_layer4.conv1x1_d2.bias", "CCN.fuse_layer4.conv1x1_d3.weight", "CCN.fuse_layer4.conv1x1_d3.bias", "CCN.fuse_layer4.conv1x1_d4.weight", "CCN.fuse_layer4.conv1x1_d4.bias", "CCN.fuse_layer4.conv_d1.weight", "CCN.fuse_layer4.conv_d1.bias", "CCN.fuse_layer4.conv_d2.weight", "CCN.fuse_layer4.conv_d2.bias", "CCN.fuse_layer4.conv_d3.weight", "CCN.fuse_layer4.conv_d3.bias", "CCN.fuse_layer4.conv_d4.weight", "CCN.fuse_layer4.conv_d4.bias", "CCN.fuse_layer3.conv1x1_d1.weight", "CCN.fuse_layer3.conv1x1_d1.bias", "CCN.fuse_layer3.conv1x1_d2.weight", "CCN.fuse_layer3.conv1x1_d2.bias", "CCN.fuse_layer3.conv1x1_d3.weight", "CCN.fuse_layer3.conv1x1_d3.bias", "CCN.fuse_layer3.conv1x1_d4.weight", "CCN.fuse_layer3.conv1x1_d4.bias", "CCN.fuse_layer3.conv_d1.weight", "CCN.fuse_layer3.conv_d1.bias", "CCN.fuse_layer3.conv_d2.weight", "CCN.fuse_layer3.conv_d2.bias", "CCN.fuse_layer3.conv_d3.weight", "CCN.fuse_layer3.conv_d3.bias", "CCN.fuse_layer3.conv_d4.weight", "CCN.fuse_layer3.conv_d4.bias", "CCN.count_layer5.avgpool_layer.0.weight", "CCN.count_layer5.avgpool_layer.0.bias", "CCN.count_layer5.maxpool_layer.0.weight", "CCN.count_layer5.maxpool_layer.0.bias", "CCN.count_layer5.conv1x1.0.weight", "CCN.count_layer5.conv1x1.0.bias", "CCN.count_layer4.avgpool_layer.0.weight", "CCN.count_layer4.avgpool_layer.0.bias", "CCN.count_layer4.maxpool_layer.0.weight", "CCN.count_layer4.maxpool_layer.0.bias", "CCN.count_layer4.conv1x1.0.weight", "CCN.count_layer4.conv1x1.0.bias", "CCN.count_layer3.avgpool_layer.0.weight", "CCN.count_layer3.avgpool_layer.0.bias", "CCN.count_layer3.maxpool_layer.0.weight", "CCN.count_layer3.maxpool_layer.0.bias", "CCN.count_layer3.conv1x1.0.weight", "CCN.count_layer3.conv1x1.0.bias", "CCN.layer5_k.0.weight", "CCN.layer5_k.0.bias", "CCN.layer4_k.0.weight", "CCN.layer4_k.0.bias", "CCN.layer3_k.0.weight", "CCN.layer3_k.0.bias", "CCN.layer5_i.0.weight", "CCN.layer5_i.0.bias", "CCN.layer4_i.0.weight", "CCN.layer4_i.0.bias", "CCN.layer3_i.0.weight", "CCN.layer3_i.0.bias", "CCN.layer5_p.0.weight", "CCN.layer5_p.0.bias", "CCN.layer4_p.0.weight", "CCN.layer4_p.0.bias", "CCN.layer3_p.0.weight", "CCN.layer3_p.0.bias".
Unexpected key(s) in state_dict: "features.0.weight", "features.0.bias", "features.2.weight", "features.2.bias", "features.5.weight", "features.5.bias", "features.7.weight", "features.7.bias", "features.10.weight", "features.10.bias", "features.12.weight", "features.12.bias", "features.14.weight", "features.14.bias", "features.17.weight", "features.17.bias", "features.19.weight", "features.19.bias", "features.21.weight", "features.21.bias", "features.24.weight", "features.24.bias", "features.26.weight", "features.26.bias", "features.28.weight", "features.28.bias", "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias", "classifier.6.weight", "classifier.6.bias".

Influence of data preprocessing on model performance

Hi, thanks for your excellent work and the open-source codes!
I'm very interested in the novel optimization criterion proposed in your paper and tried to reproduce it locally. But there is a confusing problem of performance degradation when I restrained the height and width of the test images to make sure that they are divisible by a particular number (like, 8, 16, or 32). This data preprocessing strategy is inspired by C^3 Framework and guarantees the output size of some down-sampling layers count meet the requirements of subsequent processing. More details of the test results are shown in the table below.

pretrained resize MAE MSE
Reported ✔️ 59.68 95.72
Reproduce ✔️ ✔️ 62.47 101.98

This issue is to sincerely ask you how such a simple operation can have such an obvious impact on the experimental results.

single image test

Thanks for your great work.I want to get density map of a single picture from other dataset, such as the photo took by myself.Can you provide the code? Thanks.

Trained dataset shape

Hi,
I noticed that this model accept any image shape and produce different pred map shapes according to the input image shape,
So is this normal ?
Does there any recommended image size for the model ?, like the one it trained with?

"I am asking this question because I need specific input and output shapes to convert it to engine"

question

Hello, I find your work has been accepted by ECCV. Congratuations, but I want to ask when can you release your training code?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.