Verg-Avesta / CounTR

CounTR: Transformer-based Generalised Visual Counting
https://verg-avesta.github.io/CounTR_Webpage/
MIT License
92 stars 9 forks source link

Density Maps #12

Closed jaideep11061982 closed 1 year ago

jaideep11061982 commented 1 year ago

How do we generate the density maps for the Training on custom Data. Are they needed ?

jaideep11061982 commented 1 year ago

@Verg-Avesta @WeidiXie

Verg-Avesta commented 1 year ago

You can use the same way mentioned in the paper.

Yes, the density maps are needed for supervised fine-tune.

jaideep11061982 commented 1 year ago

@Verg-Avesta Thank you for your time and reverts . I highly appreciate that includes your great work. Please bear with me for some more queries 1) How do we fine tune in Zero Shot mode if suppose I cant generate the Exemplar bounding box for my custom data set ? 2) Will performance of the model be lower in case of no exemplar bounding box given i.e zero shot 3) Using your provided fine tune weights I can get good results for some of custom object images in few shot mode, can we get similar results using these same weight in zero shot mode ,i.e i give empty boxes list.

4) I dont see any difference between the FSC_test_cross(few-shot).py & FSC_test_cross(zero-shot).py,In both cases you are passing bounding boxes (as per you paper zero shot means without bounding boxes ,correct me if I am wrong)

Verg-Avesta commented 1 year ago
  1. In zero-shot mode, you don't need to provide the exemplar bound boxes and the model will directly count the "salient" objects in the image. So the fine-tuning process is similar to the few-shot mode, except no bound boxes.

  2. Yes. For those images with multiple categories of objects, zero-shot counting will perfom less well due to the ambiguity. But if the image only has a single category, the performance will be nearly the same.

  3. See 2, if your custom images don't have multiple categories of objects, the results will be similar.

  4. In fact, these two files only have small differences. The model uses 0 for the number of exemplars and the test-time normalisation is banned in zero-shot mode. I write like this for the convenience and I feel sorry for the misleading. Though the bound boxes are passed, they are actually not used in the zero-shot mode. So if you don't provide the exemplars in the zero-shot mode, it is alright.

jaideep11061982 commented 1 year ago

@Verg-Avesta for this fsc data set how did you got the exemplar boxes ,i think they aren't present with dataset just density maps there

Verg-Avesta commented 1 year ago

They provided it in the json file.

jaideep11061982 commented 1 year ago

@Verg-Avesta I am not able to find it along with the FSC dataset, did you mean the ones used in Learntocount every thing paper link?

secondly, why do use this order y1, x1, y2, x2 = box2[0], box2[1], box2[2], box2[3] instead of x1,y1 ?