CrowdCounting-P2PNet icon indicating copy to clipboard operation
CrowdCounting-P2PNet copied to clipboard

求教大佬们一个问题哈,代码中出现的两个lilst文件是如何产生的,刚接触该方面

Open lanmeizhi666 opened this issue 2 years ago • 6 comments

lanmeizhi666 avatar May 22 '22 05:05 lanmeizhi666

We use a list file to collect all the images and their ground truth annotations in a counting dataset. When your dataset is organized as recommended in the following, the format of this list file is defined as:

train/scene01/img01.jpg train/scene01/img01.txt
train/scene01/img02.jpg train/scene01/img02.txt
...
train/scene02/img01.jpg train/scene02/img01.txt

fanweiya avatar Jul 20 '22 06:07 fanweiya

我也想知道

van-der-Poel avatar Oct 25 '22 06:10 van-der-Poel

@van-der-Poel @lanmeizhi666 您好,您可以在包含train和test的数据集文件夹里先创建一个txt文档,命名为train.txt. 文件内容是您数据集每一个图片和标注txt的路径, 比如作者的示例: train/scene01/img01.jpg train/scene01/img01.txt train/scene01/img02.jpg train/scene01/img02.txt ... 所有的train文件夹里包含的图片和txt路径都写上之后,将train.txt文件存为别的文件,文件类型选择为全部文件,文件名部分改为train.list保存 test.list也是用同样的方式创建

slent310 avatar Dec 06 '22 06:12 slent310

We use a list file to collect all the images and their ground truth annotations in a counting dataset. When your dataset is organized as recommended in the following, the format of this list file is defined as:

train/scene01/img01.jpg train/scene01/img01.txt
train/scene01/img02.jpg train/scene01/img02.txt
...
train/scene02/img01.jpg train/scene02/img01.txt

Got an error: File "/content/gdrive/MyDrive/P2PNET_ROOT/crowd_datasets/SHHA/SHHA.py", line 87, in getitem image_id = int(img_path.split('/')[-1].split('.')[0].split('_')[-1]) ValueError: invalid literal for int() with base 10: 'img19'

Seems that the name style is not compatible with the code. Perhaps should name "img01.jpg" to "img_01.jpg"? Anyone has successfully trained with the code?

Charlesyyun avatar Apr 18 '23 09:04 Charlesyyun

谢谢啦!!! @Charlesyyun @slent310 @fanweiya

lanmeizhi666 avatar Apr 18 '23 10:04 lanmeizhi666

@lanmeizhi666 @fanweiya 您能分享正确版本的数据集吗?

Sssanek avatar May 04 '23 07:05 Sssanek