Verg-Avesta / CounTR

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

AttributeError: 'PosixPath' object has no attribute 'im_dir'. Did you mean: 'is_dir'? #45

Open LokeSiewWen opened 4 months ago

LokeSiewWen commented 4 months ago

Hi, May I know how to use the FSC_pretrain.py? because currently I am encountering this error when running this line.

!python FSC_pretrain.py --epochs 5 --output_dir results/finetune_aug --resume weights/FSC147.pth --data_path data/fsc/ --anno_file annotations.json --data_split_file train_test_val.json --im_dir images

image

Thank you in advance! :)

LokeSiewWen commented 4 months ago

Hi Author @Verg-Avesta , I think I solved this issue.

But I have another question would like your clarification. In the FSC_pretrain.py, may I know why the density map (.npy) need to be load? If I have another dataset, do I need to generate the .npy file as well? image

Thanks in advance :)

Verg-Avesta commented 4 months ago

It's not needed. You can remove that part.