TencentYoutuResearch / CrowdCounting-P2PNet

The official codes for the ICCV2021 Oral presentation "Rethinking Counting and Localization in Crowds: A Purely Point-Based Framework"
Other
404 stars 109 forks source link

[Bug]: key error in weight_dict & losses #48

Open zhiyuanyou opened 1 year ago

zhiyuanyou commented 1 year ago

In models/p2pnet.py:

Line 278: losses['loss_point'] = loss_bbox.sum() / num_points Line 335: weight_dict = {'loss_ce': 1, 'loss_points': args.point_loss_coef}

one is "loss_points" and another is "loss_point" (an "s" is different) ! This would cause that the point loss is actually not used, which is fully wrong!

dddddasda commented 10 months ago

I found that too, but I can get results comparable with the official ones on ShanghaiTech A dataset even without point loss item. How about you?