-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgenerate_setD.py
61 lines (43 loc) · 1.43 KB
/
generate_setD.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
58
59
60
61
from video_libs import global_tranformation, reformatting
import os
import numpy as np
"""
Step 1: global tranformation with filling, border adding, ...
step 2: re-formate video by reducing the video bitrate and resolution
"""
def generate_positive():
input_path = r"F:\stvd\set_A\positive"
output_path = r"F:\stvd\tmp_D\positive"
for roots, dirs, files in os.walk(input_path):
for name in files:
global_tranformation(input_path, name, output_path)
return
"""
"""
def generate_negative():
input_path = r"F:\stvd\set_A\negative"
output_path = r"F:\stvd\tmp_D\negative"
for roots, dirs, files in os.walk(input_path):
for name in files:
global_tranformation(input_path, name, output_path)
return
""""
"""
def post_processing():
input_path = r"F:\stvd\tmp_D\positive"
output_path = r"F:\stvd\set_D\positive"
for roots, dirs, files in os.walk(input_path):
for name in files:
reformatting(input_path, name, output_path)
input_path = r"F:\stvd\tmp_D\negative"
output_path = r"F:\stvd\set_D\negative"
for roots, dirs, files in os.walk(input_path):
for name in files:
reformatting(input_path, name, output_path)
return
def main():
generate_positive()
generate_negative()
post_processing()
if __name__ == '__main__':
main()