zhiyuanyou / SAFECount

[WACV 2023] Few-shot Object Counting with Similarity-Aware Feature Enhancement
Other
124 stars 22 forks source link

About cross-dataset setting #31

Closed kangyeolk closed 9 months ago

kangyeolk commented 9 months ago

Hi,

Thank you for sharing wonderful work!

Could you elaborate the performance differences between safecount.py (when initializing fsc146 pre-trained model) and safecount_crossdataset.py ?

zhiyuanyou commented 9 months ago

In FSC-147, there are exemplar boxes, so we crop the feature map in each layer for better enhancement. But for CARPK, there are no exemplar boxes, only small exemplar images, we can not crop the feature map in each layer.

So the implementations of these two models are different. Directly transferring weights suffers from poor performance.

kangyeolk commented 9 months ago

Okay, I'm trying to train my own model with custom dataset (600 images with boxes). In my understanding then, is it more proper to use safecount.py model?

Another question is that my data doesn't vary much in object size with distance. What do you think about standardizing the heatmap size uniformly?

Thank you :)

zhiyuanyou commented 9 months ago

I think it is more proper to use the safecount.py model. I did not get the meanings of "doesn't vary much in object size with distance". Could you give some examples?

kangyeolk commented 9 months ago

Ah, ignore what I said above. My question is about the heatmap size being determined by the size of the bounding box. In the gen_gt_density.py part, since the radius is set based on a single bounding box, the heatmap sometimes gets quite large. Actually, in my data, the objects are thin, so it seems more appropriate to arbitrarily set the heatmap smaller, but I'm wondering if this will affect the training.

After training and conducting inference, I noticed that if even one object in the image is large, the heatmap tends to be larger overall. image image

zhiyuanyou commented 9 months ago

This could be a question.

I am not sure which one (larger or smaller focus) could be better. You can do experiments to compare.

kangyeolk commented 9 months ago

Okay, thank you for your kind answer!