-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmergeResultneedUPDATE.py
57 lines (49 loc) · 1.64 KB
/
mergeResultneedUPDATE.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import pandas as pd
import os
labels = ["small-vehicle",
"large-vehicle",
"plane",
"harbor",
"ship",
"helicopter",
"bridge",
"swimming-pool",
"baseball-diamond",
"roundabout",
"tennis-court",
"storage-tank",
"soccer-ball-field",
"basketball-court",
"ground-track-field",
"container-crane"]
for i in labels:
data = pd.read_table("/home/dingjin/Yolov3_DOTA/yolo/results/Yolov3_JPEG800/" + "comp4_det_test_" + i + ".txt",
sep=' ', names=['image', 'score', 'x', 'y', 'w', 'h'])
data.insert(loc=1, column='id', value=i)
data.to_csv("/home/dingjin/Yolov3_DOTA/yolo/results/Yolov3_JPEG800/merge/" + i + ".txt", sep=' ',
header=None, index=None)
#print(i)
'''
labels = ["small-vehicle",
"large-vehicle",
"plane",
"harbor",
"ship",
"helicopter",
"bridge",
"swimming-pool",
"baseball-diamond",
#"roundabout",
#"tennis-court",
#"storage-tank",
#"soccer-ball-field",
#"basketball-court",
#"ground-track-field",
#"container-crane"]
data = pd.read_csv("/home/dingjin/Yolov3_DOTA/yolo/results/comp4_det_test_baseball-diamond.txt",
sep=' ', names=['image', 'score', 'x', 'y', 'w', 'h'])
#df = data.drop(columns='score')
data.insert(loc=1, column='id', value='baseball-diamond')
data.to_csv("/home/dingjin/Yolov3_DOTA/yolo/results/merge/baseball-diamond.txt", sep=' ', header=None, index=None)
print(data)
'''