mirror of
https://github.com/LdDl/go-darknet.git
synced 2025-09-26 19:51:27 +08:00
17 lines
358 B
C
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];
|
|
} |