niki-amini-naieni/CountGD

Why is the maximum count of a picture 900?

Closed this issue · 3 comments

Excellent effect!
As the title says, the maximum count I tested is 900

Hi @tms2003, thank you for your question! For the FSC-147 inference code, when the maximum count (900) is predicted, we employ an adaptive cropping scheme (see description below from Appendix D of the paper), so that our algorithm can handle more than 900 objects. This is not implemented yet for the app, which can count at most 900 objects as a result.
image

The reason that without the adaptive cropping the maximum count is 900 is that the number of queries for the CountGD architecture is set to 900, as it was for GroundingDINO. See below image from our paper specifying this.
image

The number of queries parameter places a quota on the number of objects that can be detected. We found that when this quota is reached, cropping the image and applying CountGD to each crop and then summing the result of each crop to get the final count produces good results.

This PDF (https://github.com/niki-amini-naieni/CountGD/blob/main/cropping.pdf) I have provided in the repository may give you further clarification.
image

Thank you for the detailed instructions. Excellent work.thanks!