mscnn icon indicating copy to clipboard operation
mscnn copied to clipboard

how to generate the density map?

Open NextGuido opened this issue 6 years ago • 8 comments

@Ling-Bao hi! I'm trying to use your code with my own dataset, but I don't know how to generate the density map as you gave. So can you tell me how to do that? thx

NextGuido avatar Sep 26 '18 08:09 NextGuido

You can find method of density map generation in this site:https://github.com/Ling-Bao/ACSCP_cGAN#addtional

Ling-Bao avatar Oct 20 '18 13:10 Ling-Bao

可以对密度生成制作的matlab代码进行参数修改以满足你的要求,https://github.com/Ling-Bao/ACSCP_cGAN/blob/master/data_maker/step3/map_mcnn.m

line 40  ip.addParameter('type', 'MCNN'); 
修改为:
ip.addParameter('type', ''); 

Ling-Bao avatar Oct 28 '18 10:10 Ling-Bao

Hi,

I'm getting this error while trying to generate density map using your file. Please help me solve it.

Undefined function or variable 'searchhead'.

Error in map_mcnn (line 144) SearchHeads = searchhead(D, p, q, radius); % 搜索半径递增

sratandeep16 avatar Feb 18 '19 09:02 sratandeep16

You can find searchhead(A , i0, j0, radius) from searchhead.m。project is from data_maker

Ling-Bao avatar Feb 18 '19 14:02 Ling-Bao

@NextGuido 项目ACSCP_cGAN可以实现输出的密度估计图和原图大小相同。线上使用的生成器模型我单独分开了,你可以参考generator_large(self, image, batch_size=1, use_dropout=True, reuse=False)的网络结构。通过使用上采样或是反卷积都可以实现输入和输出图像大小相同,但需要注意输入图像的尺寸大小,如果下采样为奇数*奇数的feature map,然后还要继续下采样就不太好恢复为原始大小了。

Ling-Bao avatar Feb 18 '19 14:02 Ling-Bao

Hi, After using searchhead.m, I am getting this error " Undefined function or variable 'distance'. "

sratandeep16 avatar Feb 25 '19 07:02 sratandeep16

Hi, The map_mcnn.m given has a few errors and missing code as per the latest matlab. I've fixed it and can confirm that they work because this model trains on my custom dataset. Link is given below. MCNN_Density_Matlab.zip

shriramhr avatar Mar 06 '19 09:03 shriramhr

Thanx @shriramhr . You have acted as a true friend of mine.

sratandeep16 avatar Mar 15 '19 08:03 sratandeep16