-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtst_commands.py
More file actions
74 lines (68 loc) · 1.81 KB
/
tst_commands.py
File metadata and controls
74 lines (68 loc) · 1.81 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
import sys
from pathlib import Path
from const_utils.arguments import Arguments
from const_utils.commands import Commands
from data_forge import DataForge
MAPPING = {
Commands.slice: [
"data_forge.py",
"slice",
"./media/",
"--dst", "./media/imgs/",
"-p", ".mp4", ".MP4",
"-t", ".jpg",
# "-r",
"-s", "60",
"-step", "1",
],
Commands.delete: [
"data_forge.py",
"delete",
"./media/imgs_new/",
"-p", ".jpg",
],
Commands.move: [
"data_forge.py",
"move",
"./media/imgs/",
"--dst", "./media/imgs_new/",
"-p", ".jpg", ".png",
"-r",
"-s", "30"
],
Commands.dedup: [
"data_forge.py",
"dedup",
"./media/imgs/",
# "/mnt/qnap/Staff/Naumenko/NotTheSkynet/img_dataset/",
# "/home/pivden/PycharmProjects/yoloTrainer/saved_imgs/",
"-p", ".jpg", ".png",
"--datatype", "image",
"--threshold", "10",
"--cache_name", "test1"
],
Commands.convert_annotations: [
"data_forge.py",
"convert-annotations",
"./media/annotated/",
"--dst", "./media/yolo_anns/",
"-p", "yolo",
"--img_path", "./media/annotated/", # only for converting from yolo format
"--destination-type", "voc"
],
Commands.stats: [
"data_forge.py",
"stats",
# "./media/Pascal VOC 2012.v1-raw.voc/",
"./media/annotated/",
"-p", ".xml",
"--destination-type", "voc",
# "--cache_name", "Pascal_VOC_2012_v1-raw.voc"
]
}
if __name__ == "__main__":
MAPPING[Commands.dedup].append(Arguments.core_size)
MAPPING[Commands.dedup].append("16")
sys.argv = MAPPING[Commands.stats]
app = DataForge()
app.execute()