xhp-hust-2018-2011 / SS-DCNet

From Open Set to Closed Set: Supervised Spatial Divide-and-Conquer for Object Counting
78 stars 19 forks source link

density map #5

Open kewin1807 opened 4 years ago

kewin1807 commented 4 years ago

Please show me the code test with an image, which is show density map feature. Thanks

poppinace commented 4 years ago

SS-DCNet follows the local count framework. It does not produce a per-pixel density map like conventional counting networks do.

Artyrm commented 4 years ago

Anyway, are there any intermittent steps that could be visualized to illustrate the counting process? Density map is quite illustrative for that matter.

Artyrm commented 4 years ago

I found that you can go like this:

f1 = plt.figure(1)
outputs = outputs.cpu()
outputs = outputs.squeeze(0)
outputs = outputs.squeeze(0)

pred_frame = plt.gca()
plt.imshow(outputs, 'jet')
pred_frame.axes.get_yaxis().set_visible(False)
pred_frame.axes.get_xaxis().set_visible(False)

Pretty satisfactory for me.

jaideep11061982 commented 2 years ago

@poppinace @Artyrm how would labels of this dataset look like. I see it does labels.sum() in validation.py i dint understand why do we .sum() could you please explain