Add json detection creation for codalab check

Signed-off-by: Micaela Verucchi <micaelaverucchi@gmail.com>
This commit is contained in:
Micaela Verucchi
2020-05-11 11:57:58 +02:00
parent 3be4fe0117
commit 5eb0cbfcef
17 changed files with 2119 additions and 34 deletions
+5 -1
View File
@@ -243,7 +243,7 @@ void MobilenetDetection::preprocess(cv::Mat &frame){
#endif
}
void MobilenetDetection::postprocess(){
void MobilenetDetection::postprocess(const bool mAP){
//get confidences and locations_h
dnnType *rt_out[2];
rt_out[0] = (dnnType *)netRT->buffersRT[3];
@@ -273,6 +273,10 @@ void MobilenetDetection::postprocess(){
b.w = locations_h[j * N_COORDS + 2];
b.h = locations_h[j * N_COORDS + 3];
if(mAP)
for(int c=1; c<classes; c++)
b.probs.push_back(confidences_h[c * nPriors + j]);
boxes.push_back(b);
}
}