This repository was archived by the owner on May 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsplit_train_test.py
More file actions
57 lines (49 loc) · 1.7 KB
/
split_train_test.py
File metadata and controls
57 lines (49 loc) · 1.7 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
from typing import Dict
from copy import deepcopy
from collections import defaultdict
from AI.src.preprocessing.split_train_test import *
def main() -> None:
spath: str = "/home/trong/Downloads/Dataset/VAD/final"
# Key format: f"{ds_phase}_{ds_name}_{ds_phase}_{ds_type}"
counter: Dict[str, int] = defaultdict(int)
# unlabeled_to_train_val(
# [
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/train/crawled_data/",
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/train/IITB/",
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/train/UCF/",
# ],
# {
# "crawled_data": 0.85,
# "IITB": 0.85,
# "UCF": 0.85
# },
# deepcopy(spath),
# counter,
# overwrite_prev_log=True
# )
labeled_to_test(
[
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/test/UCF",
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/test/IITB",
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/test/UBI-FIGHT"
],
deepcopy(spath),
counter,
overwrite_prev_log=True
)
# labeled_to_train_val(
# [
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/train/IITB",
# "/home/trong/Downloads/Dataset/VAD/preprocessing/stage_2/train/UBI-FIGHT",
# ],
# {
# "IITB": 0.8,
# "UBI-FIGHT": 0.8,
# },
# deepcopy(spath),
# counter,
# overwrite_prev_log=False
# )
return None
if __name__ == '__main__':
main()