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 adb5a693cd
commit 533bb48789
17 changed files with 2119 additions and 34 deletions
+4 -1
View File
@@ -83,7 +83,7 @@ void Yolo3Detection::preprocess(cv::Mat &frame){
#endif
}
void Yolo3Detection::postprocess(){
void Yolo3Detection::postprocess(const bool mAP){
//get yolo outputs
dnnType *rt_out[netRT->pluginFactory->n_yolos];
for(int i=0; i<netRT->pluginFactory->n_yolos; i++) {
@@ -132,6 +132,9 @@ void Yolo3Detection::postprocess(){
res.y = y0;
res.w = x1 - x0;
res.h = y1 - y0;
if(mAP)
for(int c=0; c<classes; c++)
res.probs.push_back(dets[j].prob[c]);
detected.push_back(res);
}
}