@@ -73,14 +73,14 @@ def main():
73
73
mmcv .imwrite (
74
74
img ,
75
75
osp .join (out_dir , 'images' , 'training' ,
76
- osp .splitext (filename )[0 ] + '.jpg ' ))
76
+ osp .splitext (filename )[0 ] + '.png ' ))
77
77
78
78
for filename in sorted (os .listdir (now_dir ))[TRAINING_LEN :]:
79
79
img = mmcv .imread (osp .join (now_dir , filename ))
80
80
mmcv .imwrite (
81
81
img ,
82
82
osp .join (out_dir , 'images' , 'validation' ,
83
- osp .splitext (filename )[0 ] + '.jpg ' ))
83
+ osp .splitext (filename )[0 ] + '.png ' ))
84
84
85
85
print ('Removing the temporary files...' )
86
86
@@ -112,14 +112,14 @@ def main():
112
112
mmcv .imwrite (
113
113
img [:, :, 0 ] // 128 ,
114
114
osp .join (out_dir , 'annotations' , 'training' ,
115
- osp .splitext (filename )[0 ] + '.jpg ' ))
115
+ osp .splitext (filename )[0 ] + '.png ' ))
116
116
117
117
for filename in sorted (os .listdir (now_dir ))[TRAINING_LEN :]:
118
118
img = mmcv .imread (osp .join (now_dir , filename ))
119
119
mmcv .imwrite (
120
120
img [:, :, 0 ] // 128 ,
121
121
osp .join (out_dir , 'annotations' , 'validation' ,
122
- osp .splitext (filename )[0 ] + '.jpg ' ))
122
+ osp .splitext (filename )[0 ] + '.png ' ))
123
123
124
124
print ('Removing the temporary files...' )
125
125
@@ -147,14 +147,14 @@ def main():
147
147
mmcv .imwrite (
148
148
img [:, :, 0 ] // 128 ,
149
149
osp .join (out_dir , 'annotations' , 'training' ,
150
- osp .splitext (filename )[0 ] + '.jpg ' ))
150
+ osp .splitext (filename )[0 ] + '.png ' ))
151
151
152
152
for filename in sorted (os .listdir (now_dir ))[TRAINING_LEN :]:
153
153
img = mmcv .imread (osp .join (now_dir , filename ))
154
154
mmcv .imwrite (
155
155
img [:, :, 0 ] // 128 ,
156
156
osp .join (out_dir , 'annotations' , 'validation' ,
157
- osp .splitext (filename )[0 ] + '.jpg ' ))
157
+ osp .splitext (filename )[0 ] + '.png ' ))
158
158
159
159
print ('Removing the temporary files...' )
160
160
0 commit comments