JackWoo0831 / DepthMOT

MIT License
10 stars 2 forks source link

gen_labels_uavdt.py找不到gt文件 #5

Open xun9167 opened 3 months ago

xun9167 commented 3 months ago

在运行gen_labels_uavdt.py时,发现这里的gt文件为一个,但是uavdt数据集中的gt文件是分开的多个,是否要把所以的分开的gt文件都复制粘贴在一起,还是需要其他的操作

JackWoo0831 commented 3 months ago

您好,这个脚本应该会按照yolo格式创建多个gt文件,路径是./$dataset_path/labels_with_ids/trian, val or test/$seq_name/gt.txt$, 如以下代码所示:

            to_file = osp.join(DATA_ROOT, 'labels_with_ids', split, seq)
            if not osp.exists(to_file):
                os.makedirs(to_file)

            to_file = osp.join(to_file, 'img' + str(idx + 1).zfill(6) + '.txt')

            # with open(to_file, 'a') as f_to:
            #     for line in write_lines:
            #         f_to.write(line)

貌似我上传的时候加注释了,你去掉注释试一下呢

xun9167 commented 3 months ago

确实是被注释掉了,问题已经解决了,感谢您的帮助!

勋! @.***

 

------------------ 原始邮件 ------------------ 发件人: "JackWoo0831/DepthMOT" @.>; 发送时间: 2024年5月31日(星期五) 下午5:48 @.>; @.**@.>; 主题: Re: [JackWoo0831/DepthMOT] gen_labels_uavdt.py找不到gt文件 (Issue #5)

您好,这个脚本应该会按照yolo格式创建多个gt文件,路径是./$dataset_path/labels_with_ids/trian, val or test/$seq_name/gt.txt$, 如以下代码所示: to_file = osp.join(DATA_ROOT, 'labels_with_ids', split, seq) if not osp.exists(to_file): os.makedirs(to_file)to_file = osp.join(to_file, 'img' + str(idx + 1).zfill(6) + '.txt')# with open(to_file, 'a') as f_to: # for line in write_lines: # f_to.write(line) 貌似我上传的时候加注释了,你去掉注释试一下呢 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>