-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlabel_mavic3_lab.py
68 lines (61 loc) · 2.14 KB
/
label_mavic3_lab.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
65
66
67
68
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-arl/01_30_23/mavic3/*.zst",
# "/data/s3_gamutrf/gamutrf-arl/01_30_23/mavic3/gamutrf_recording_ettus__gain40_1675089393_5735500000Hz_20480000sps.s16.sigmf-meta"
]
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,
# label="mini2_video",
avg_window_len=256,
avg_duration=0.25,
debug=False,
spectral_energy_threshold=True,
# force_threshold_db=-60,
overwrite=False,
# min_bandwidth=16e6,
# min_annotation_length=10000,
# max_annotations=500,
# dc_block=True,
# time_start_stop=(1,3.5),
# necessary={
# "annotation_seconds": (0.001, -1)
# },
labels={
"mavic3_video": {
"bandwidth_limits": (16e6, None),
"annotation_length": (10000, None),
"annotation_seconds": (0.001, None),
"set_bandwidth": (-9e6, 9e6),
},
"mavic3_telem": {
"bandwidth_limits": (None, 16e6),
"annotation_length": (10000, None),
"annotation_seconds": (None, 0.001),
},
},
)
# annotation_utils.annotate(
# data_obj,
# label="mini2_telem",
# avg_window_len=256,
# avg_duration=0.25,
# debug=False,
# spectral_energy_threshold=True,
# # force_threshold_db=-58,
# overwrite=False,
# max_bandwidth=16e6,
# min_annotation_length=10000,
# # max_annotations=500,
# # dc_block=True,
# necessary={
# "annotation_seconds": (0, 0.001)
# },
# )