TencentYoutuResearch / CrowdCounting-P2PNet

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

annotation data #43

Open YN-e1023 opened 1 year ago

YN-e1023 commented 1 year ago

Thank you for your great code and algorisms. I'm trying to use this code, but still not work.

When I run train.py, I got this massage as blow.

Namespace(backbone='vgg16_bn', batch_size=8, checkpoints_dir='./ckpt', clip_max_norm=0.1, data_root='/content/drive/MyDrive/DATA_ROOT', dataset_file='SHHA', eos_coef=0.5, epochs=3500, eval=False, eval_freq=5, frozen_weights=None, gpu_id=0, line=2, lr=0.0001, lr_backbone=1e-05, lr_drop=3500, num_workers=8, output_dir='./logs', point_loss_coef=0.0002, resume='', row=2, seed=42, set_cost_class=1, set_cost_point=0.05, start_epoch=0, tensorboard_dir='./runs', weight_decay=0.0001) number of params: 21579344 Start training Averaged stats: Traceback (most recent call last): File "train.py", line 222, in main(args) File "train.py", line 161, in main args.clip_max_norm) File "/content/CrowdCounting-P2PNet/engine.py", line 120, in train_one_epoch print("Averaged stats:", metric_logger) File "/content/CrowdCounting-P2PNet/util/misc.py", line 186, in str "{}: {}".format(name, str(meter)) File "/content/CrowdCounting-P2PNet/util/misc.py", line 85, in str median=self.median, File "/content/CrowdCounting-P2PNet/util/misc.py", line 64, in median return d.median().item() RuntimeError: median cannot be called with empty tensor

I seem it cannot read dataset from list file. my train.list is train/RIMG6463.JPG train/RIMG6463.txt train/RIMG6464.JPG train/RIMG6464.txt train/RIMG6465.JPG train/RIMG6465.txt train/RIMG6466.JPG train/RIMG6466.txt train/RIMG6467.JPG train/RIMG6467.txt

that under DATA_ROOT. What is wrong about this?

Thank you for your help.

oceam commented 1 year ago

change your batch size or add more images to your train folder