44 <<
"Ground truth coordinates: " <<
fnGt << std::endl
45 <<
"Coordinates to evaluate: " <<
fnEval << std::endl
46 <<
"Number of micrographs: " <<
numMic << std::endl
47 <<
"Tolerance of center misplacement: " <<
errMargin << std::endl
48 <<
"Root name: " <<
rootName << std::endl
55 addUsageLine(
"Evaluates the set of coordinates against the ground truth");
56 addParamsLine(
" -g <selfile> : Selfile containing ground truth coordinates");
57 addParamsLine(
" -e <selfile> : Selfile containing coordinates to evaluate");
59 addParamsLine(
" [-t <int=10>] : Tolerance of center misplacement");
60 addParamsLine(
" --root <rootName> : Root name of the micrographs");
65 int evalXCoor, evalYCoor, gtXCoor, gtYCoor;
66 int truePosivites = 0, totalEval = 0, totalGT = 0;
79 for (
size_t objIdEval :
Eval.
ids())
87 for (
size_t objIdGT :
GT.
ids())
93 if ((evalXCoor > (gtXCoor-
errMargin-1)) &&
107 std::cout << std::endl;
108 std::cout <<
"True positives (correctly picked particles): ";
109 std::cout << truePosivites << std::endl;
110 std::cout <<
"False positives (incorrectly picked particles): ";
111 std::cout << totalEval - truePosivites << std::endl;
112 std::cout <<
"False negatives (missed particles): ";
113 std::cout << totalGT - truePosivites << std::endl << std::endl;
115 std::cout <<
"How many relevant particles are picked:" << std::endl;
116 std::cout <<
"True positive rate: ";
117 double truePositiveRate = (0 == totalGT) ? 0 : (
double) truePosivites / totalGT;
118 std::cout << truePositiveRate << std::endl << std::endl;
120 std::cout <<
"Ratio of wrongly picked particles and all picked particles:";
121 std::cout << std::endl;
122 std::cout <<
"False positive rate: ";
123 std::cout << (double) (totalEval - truePosivites) / totalEval;
124 std::cout << std::endl << std::endl;
void readParams()
Read argument.
T & getValue(MDLabel label)
const char * getParam(const char *param, int arg=0)
int verbose
Verbosity level.
void defineParams()
Define parameters.
String formatString(const char *format,...)
void addUsageLine(const char *line, bool verbatim=false)
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)