File size: 734 Bytes
fe82258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
import subprocess
import dover_lap



rttm_conf_dir = '' # path to the seg_CONF model output (RTTM file)

rttm_fa_dir = '' # path to the seg_FA model output (RTTM file)

rttm_miss_dir = '' # path to the seg_MISS model output (RTTM file)

rttm_output_dir = '' # path to DOVER-Lap output (RTTM file)

if not os.path.exists(rttm_output_dir):
    os.makedirs(rttm_output_dir)


bashCommand_doverlap = "dover-lap" + " " + rttm_output_dir + " " + rttm_conf_dir + " " + rttm_fa_dir + " " + rttm_miss_dir

weights = " " + "--weight-type custom --custom-weight '[0.37,0.26,0.37]'" # custom weights based on the RTVE database

bashCommand = bashCommand_doverlap + weights

subprocess.run(bashCommand, shell=True, capture_output=True)