Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 96587ec

Browse files
zRzR
authored andcommitted
Thanks for everyone
1 parent 63aa0a5 commit 96587ec

14 files changed

+170
-919
lines changed

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,18 @@ C++_inference_TensorRT_radar: TensorRT推理代码(用于NVIDIA的GPU推理加
5656
### 数据集格式和标注方法
5757

5858
我们团队使用 [labelimg](https://github.com/heartexlabs/labelImg) 工具进行标注并保存为yolo格式。<br>
59-
本代码基于 [YoloV7](https://github.com/WongKinYiu/yolov7) 框架开发,理论上支持COCO类型数据集。
59+
本代码基于 [YOLOv7](https://github.com/WongKinYiu/yolov7) 框架开发,理论上支持COCO类型数据集。
6060

6161
### 数据集信息
6262

6363
#### 数据集来源:<br>
6464

65-
+ 西交利物浦大学RM2023赛季场地数据集数据集录制 2500张。
66-
+ 共计 2500张。
67-
<br><br>
65+
##### 西交利物浦大学雷达小目标数据集
66+
+ 西浦苏州工业园区校区无人机模拟雷达视角操场录制数据集 6100张
67+
+ 西浦太仓校区雷达站录制数据集 800张
68+
+ 西浦2023年北部赛区雷达内录 2260张
69+
+ 西浦2023年全国赛雷达内 2060张
70+
__数据集开源地址: 链接: https://pan.baidu.com/s/1ayRI1MMw40ae4kuFZCXK_Q?pwd=XPGM 提取码: XPGM__
6871

6972
#### 数据集分配:<br>
7073

@@ -156,12 +159,8 @@ C++_inference_TensorRT_radar: TensorRT推理代码(用于NVIDIA的GPU推理加
156159

157160
## 总结
158161

159-
+ 该项目针对RMUC2023赛季,如果你有好的建议,欢迎给我留言哦。
160-
+ 如果你觉得项目对你有帮助,请给个star吧~
161-
+ 如果你有更好的建议,欢迎提出PR,或者直接联系我哦,大家一起学习!
162+
+ 该项目针对RMUC2023赛季,感谢大家,由于本人已经退役,本项目不在维护。
163+
+ 如果你对该项目有兴趣,可以联系我们团队。
162164

163165
## 联系方式
164-
165-
+ 作者微信: zR_ZYX
166-
+ 作者邮箱: [email protected]
167-
+ 团队邮箱: [email protected]
166+
+ 团队邮箱: [email protected]

pre-processing_script/change_json2yolo.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

pre-processing_script/change_label.py

100755100644
Lines changed: 42 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,42 @@
1-
'''
2-
使用前必看:
3-
1. 如果你是按照READ.md文档的顺序标注的,那么正常你是用不到这个文件的。如果你是从其他开源站获得的数据,由于标签不对需要更改标签,那么你可以使用这
4-
个脚本帮助修改。
5-
2.使用本脚本前请备份你的标注文件。
6-
'''
7-
import os
8-
import argparse
9-
10-
11-
def change_label_name(path):
12-
total_txt = os.listdir(path)
13-
for file in total_txt:
14-
file_name = path + '/' + file
15-
file = open(file_name, 'r')
16-
lines = file.readlines()
17-
for index, line in enumerate(lines):
18-
t = lines[index] # 读取当前行的内容
19-
num = int(t[0:2])
20-
21-
# 在这里修改你想txt操作的内容
22-
if num > 7 and num < 10:
23-
t = str(num - 1) + t[1:] # 改成2加字符第二位往后
24-
lines[index] = t # 改写lines中的内容
25-
26-
if num != 15: # 切片判断前两个字符
27-
t = ''
28-
lines[index] = t
29-
30-
if num > 10: # 切片判断前两个字符
31-
t = str(num - 1) + t[2:]
32-
lines[index] = t
33-
34-
else:
35-
t = ''
36-
lines[index] = t
37-
38-
file.close()
39-
t = "".join(lines)
40-
file = open(file_name, 'w')
41-
file.write(t)
42-
file.close()
43-
44-
45-
if __name__ == '__main__':
46-
parser = argparse.ArgumentParser()
47-
parser.add_argument('path_dir', type=str, default='', help='Location of path')
48-
args = parser.parse_args()
49-
change_label_name(args.path_dir)
50-
print("Finish change_label_id!")
1+
'''
2+
使用前必看:
3+
1. 如果你是按照READ.md文档的顺序标注的,那么正常你是用不到这个文件的。如果你是从其他开源站获得的数据,由于标签不对需要更改标签,那么你可以使用这
4+
个脚本帮助修改。
5+
2.使用本脚本前请备份你的标注文件。下面的样例是将以YOLO格式导出的LabelStudio数据集转换为西浦GMaster训练的数据集
6+
'''
7+
import os
8+
import argparse
9+
10+
11+
def update_labels(folder_path):
12+
# 你的旧的和新的类别顺序
13+
old_order = ["B1", "B2", "B3", "B4", "B5", "BB", "BO", "BS", "R1", "R2", "R3", "R4", "R5", "RB", "RO", "RS"]
14+
new_order = ["B1", "B2", "B3", "B4", "B5", "BO", "BS", "R1", "R2", "R3", "R4", "R5", "RO", "RS", "BB", "RB"]
15+
16+
# 创建一个字典来映射旧的id到新的id
17+
id_mapping = {old_order.index(name): new_order.index(name) for name in old_order}
18+
19+
# 遍历标签文件
20+
for root, dirs, files in os.walk(folder_path):
21+
for file in files:
22+
if file.endswith(".txt"): # 假设标签文件是.txt格式
23+
with open(os.path.join(root, file), "r") as f:
24+
lines = f.readlines()
25+
26+
# 修改每一行的标签id
27+
for i in range(len(lines)):
28+
parts = lines[i].split(" ")
29+
parts[0] = str(id_mapping[int(parts[0])]) # 更新id
30+
lines[i] = " ".join(parts)
31+
32+
# 将修改后的行写回文件
33+
with open(os.path.join(root, file), "w") as f:
34+
f.writelines(lines)
35+
36+
37+
if __name__ == "__main__":
38+
parser = argparse.ArgumentParser(description="Update label files")
39+
parser.add_argument("folder_path", type=str, help="Path to the folder containing label files")
40+
args = parser.parse_args()
41+
42+
update_labels(args.folder_path)

pre-processing_script/change_point_order.py

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)