Files
go-darknet/detection.c
2020-02-19 14:52:19 +03:00

22 lines
362 B
C

#include <darknet.h>
#include "detection.h"
detection * get_detection(detection *dets, int index, int dets_len)
{
if (index >= dets_len) {
return NULL;
}
return dets + index;
}
float get_detection_probability(detection *det, int index, int prob_len)
{
if (index >= prob_len) {
return .0;
}
return det->prob[index];
}