evelyn0414 commited on
Commit
d8de432
·
verified ·
1 Parent(s): 540b05c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -1
README.md CHANGED
@@ -17,7 +17,16 @@ OPERA is an OPEn Respiratory Acoustic foundation model pretraining and benchmark
17
  The code is available at: https://github.com/evelyn0414/OPERA
18
 
19
 
20
-
 
 
 
 
 
 
 
 
 
21
 
22
 
23
  ## Citation
 
17
  The code is available at: https://github.com/evelyn0414/OPERA
18
 
19
 
20
+ Example for extracting feature using your own data:
21
+ ```python
22
+ from src.benchmark.model_util import extract_opera_feature
23
+
24
+ # array of filenames
25
+ sound_dir_loc = np.load(feature_dir + "sound_dir_loc.npy")
26
+ opera_features = extract_opera_feature(sound_dir_loc, pretrain="operaCT", input_sec=8, dim=768)
27
+ np.save(feature_dir + "operaCT_feature.npy", np.array(opera_features))
28
+ ```
29
+
30
 
31
 
32
  ## Citation