-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlabel-lucas-collect.py
64 lines (56 loc) · 1.98 KB
/
label-lucas-collect.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
62
63
64
import glob
from pathlib import Path
from tqdm import tqdm
import rfml.annotation_utils as annotation_utils
import rfml.data as data_class
data_globs = ["/data/s3_gamutrf/gamutrf-lucas-collect/train/mini2/*.zst"]
for file_glob in data_globs:
for f in tqdm(glob.glob(str(Path(file_glob)))):
data_obj = data_class.Data(f)
annotation_utils.reset_annotations(data_obj)
annotation_utils.annotate(
data_obj,
avg_window_len=256,
debug=False,
bandwidth_estimation=0.99, # True,
overwrite=False,
# power_estimate_duration = 0.1,
# n_components=3,
# n_init=2,
# dry_run=True,
# time_start_stop=(1,None),
labels={
"mini2_video": {
"bandwidth_limits": (16e6, None),
"annotation_length": (10000, None),
"annotation_seconds": (0.001, None),
# "set_bandwidth": (-8.5e6, 9.5e6)
},
# "mini2_telem": {
# "bandwidth_limits": (None, 16e6),
# "annotation_length": (10000, None),
# "annotation_seconds": (None, 0.001),
# }
},
)
data_globs = ["/data/s3_gamutrf/gamutrf-lucas-collect/train/environment/*.zst"]
for file_glob in data_globs:
for f in tqdm(glob.glob(str(Path(file_glob)))):
data_obj = data_class.Data(f)
annotation_utils.reset_annotations(data_obj)
annotation_utils.annotate(
data_obj,
avg_window_len=1024,
debug=False,
bandwidth_estimation=0.99, # True,
overwrite=False,
# power_estimate_duration = 0.1,
# n_components=3,
# n_init=2,
# dry_run=True,
labels={
"environment": {
"annotation_length": (2048, None),
},
},
)