Commit 51c0cf6ed9cc10667344145c59bc91aefbdf1c20
1 parent
ed5edb3e
cleaned up the metric calculation
Showing
2 changed files
with
11 additions
and
7 deletions
Show diff stats
data/04_Tb.obj
main.cpp
... | ... | @@ -18,21 +18,24 @@ int main(int argc, char* argv[]) |
18 | 18 | exit(1); |
19 | 19 | } |
20 | 20 | |
21 | + float resample_rate = 0.1; | |
22 | + | |
21 | 23 | float sigma = atof(argv[3]); |
22 | 24 | stim::network<float> GT;stim::network<float> T; |
23 | 25 | // load obj files to 3D network class |
24 | 26 | GT.load_obj(argv[1]); |
25 | 27 | T.load_obj(argv[2]); |
26 | - //std::cout<<"ground truth------"<<GT.str()<<std::endl; | |
27 | - //std::cout<<"truth-----------"<<T.str()<<std::endl; | |
28 | + | |
28 | 29 | // resample the loaded networks |
29 | 30 | stim::network<float> resampled_GT;stim::network<float> resampled_T; |
30 | - resampled_GT = GT.resample(sigma); | |
31 | - resampled_T = T.resample(sigma); | |
31 | + | |
32 | + resampled_GT = GT.resample(sigma * resample_rate); | |
33 | + resampled_T = T.resample(sigma * resample_rate); | |
34 | + | |
32 | 35 | // compare ground truth with truth and viceversa |
33 | 36 | float gFPR, gFNR; |
34 | - gFPR = GT.compare(T, sigma); | |
35 | - gFNR = T.compare(GT, sigma); | |
37 | + gFPR = resampled_GT.compare(resampled_T, sigma); | |
38 | + gFNR = resampled_T.compare(resampled_GT, sigma); | |
36 | 39 | // print false alarms and misses |
37 | 40 | std::cout << "False postive rate is " << gFPR << std::endl; |
38 | 41 | std::cout << "False negative rate is " << gFNR << std::endl; | ... | ... |