DMPR-PS icon indicating copy to clipboard operation
DMPR-PS copied to clipboard

ps_evaluate.py 报错显示标签格式不对

Open DeepRachael opened this issue 1 year ago • 4 comments
trafficstars

感谢大佬开源代码,训练完数据,对车位检测结果进行评估的时候,运行文件ps_evaluate.py,代码如下: image 报错如下:typeerror:list indices must be integers or slices, not str image

查看了预处理代码生成的标签,原因是原来json格式标签中的key: marks和slots丢了,这个该怎么解决呢

DeepRachael avatar Jul 16 '24 07:07 DeepRachael

我们提供的数据集 label 文件是包含 marksslots key 的。 如果想要创建自己的数据集,请使用 directional_point 分支的MarkToolForParkingLotPoint标注工具进行标注,并使用 mat2json.m 脚本生成 label 文件。

Teoge avatar Aug 05 '24 17:08 Teoge

谢谢回复问题,提供的数据集label文件中包含marks和slots key的,但是在用prepare_dataset.py对标签处理之后,标签中的key: marks和slots丢了,不知道是什么原因

DeepRachael avatar Aug 06 '24 06:08 DeepRachael

python ps_evaluate.py --label_directory $LABEL_DIRECTORY --image_directory $IMAGE_DIRECTORY --detector_weights $DETECTOR_WEIGHTS 中的 LABEL_DIRECTORY 指的是 test 数据集的 label 文件夹。也即是直接使用下载的数据文件即可,不需要 prepare_dataset.py 进行处理。

Teoge avatar Aug 07 '24 23:08 Teoge

解决了,谢谢大佬的帮忙🙂

DeepRachael avatar Aug 08 '24 06:08 DeepRachael