cxliu0 / PET

[ICCV 2023] Point-Query Quadtree for Crowd Counting, Localization, and More
MIT License
60 stars 5 forks source link

dual supervision for sparse/dense images #12

Closed SherlockHolmes221 closed 10 months ago

SherlockHolmes221 commented 10 months ago

why need dual supervision for sparse/dense images

In loss fuctuin dual supervision for sparse/dense images loss_ce_sp = (raw_ce_loss weights div_mask)[sp_idx].sum() / ((weights div_mask)[sp_idx].sum() + eps) loss_ce_ds = (raw_ce_loss weights div_mask)[ds_idx].sum() / ((weights div_mask)[ds_idx].sum() + eps)

thanks

cxliu0 commented 10 months ago

As explained in the paper (Page 6), we use dual supervision to prevent the loss from being diluted by samples with few people, because such samples yield small training losses.

SherlockHolmes221 commented 10 months ago

thanks