Files
go-darknet/detection.c
2020-02-21 15:47:21 +03:00

17 lines
358 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];
}