leeyeehoo / CSRNet

CSRNet: Dilated Convolutional Neural Networks for Understanding the Highly Congested Scenes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is the mean value?

wkcn opened this issue · comments

Hello!
I transfer the Caffe Model to the MXNet implementation.
And I set the mean value [103.939, 116.779, 123.68] in BGR order.
In the inference, divide the image into 4 patches and predict them, then sum the four density maps.

However, I get the result: MAE 74.712, MSE 125.011 in ShanghaiTech Part_A dataset.
It is worse than the result paper reported (MAE 68.2, MSE 115.0).

When feeding the whole image into the model, MAE: 72.585, MSE: 119.049 (mean value: [110.474, 118.574, 123.955]), MAE: 72.626, MSE: 119.541 (mean value: [103.939, 116.779, 123.68]). It is still worse than that paper reported.

And I test the model on Caffe, here is the evaluation code.
Mean Value: [110.474, 118.574, 123.955]
MAE: 72.189, MSE: 118.791 (Caffe CPU)
MAE: 72.189 MSE: 118.791 (Caffe GPU)

Mean Value: [103.939, 116.779, 123.68]
MAE:72.203, MSE: 119.219 (Caffe CPU)
MAE: 72.203 MSE: 119.219 (Caffe GPU)

Could you please provide the mean value and the prediction result?

Thank you!

you can try this:
img=test_img.copy().transpose(2,0,1).astype(np.float32)
img[0,:,:]=img.copy()[0,:,:]-92.8207477031
img[1,:,:]=img.copy()[1,:,:]-95.2757037428
img[2,:,:]=img.copy()[2,:,:]-104.877445883

thanks!

@leeyeehoo
Thank you!

Here are my testing result:
Part A:
MAE: 68.946
MSE: 116.148

Part B:
MAE: 10.636
MSE: 16.034

They are close to the result the paper reported.