Darknet/YOLO v3.0-177-gfa2353b
Object Detection Framework
 
Loading...
Searching...
No Matches
detector.cpp File Reference
Include dependency graph for detector.cpp:

Classes

struct  anchors_t
 

Macros

#define __COMPAR_FN_T
 

Typedefs

typedef int(* __compar_fn_t) (const void *, const void *)
 

Functions

int anchors_comparator (const void *pa, const void *pb)
 
int anchors_data_comparator (const float **pa, const float **pb)
 
void calc_anchors (char *datacfg, int num_of_clusters, int width, int height, int show)
 
static void eliminate_bdd (char *buf, const char *a)
 
static void get_bdd_image_id (char *filename)
 
static void print_bdd_detections (FILE *fp, char *image_path, Darknet::Detection *dets, int num_boxes, int classes, int w, int h)
 
static void print_cocos (FILE *fp, char *image_path, Darknet::Detection *dets, int num_boxes, int classes, int w, int h)
 
void print_detector_detections (FILE **fps, const char *id, Darknet::Detection *dets, int total, int classes, int w, int h)
 
void print_imagenet_detections (FILE *fp, int id, Darknet::Detection *dets, int total, int classes, int w, int h)
 
static void print_kitti_detections (FILE **fps, const char *id, Darknet::Detection *dets, int total, int classes, int w, int h, const char *outfile, const char *prefix)
 
void run_detector (int argc, char **argv)
 
void test_detector (const char *datacfg, const char *cfgfile, const char *weightfile, const char *filename, float thresh, float hier_thresh, int dont_show, int ext_output, int save_labels, const char *outfile, int letter_box, int benchmark_layers)
 
void train_detector (const char *datacfg, const char *cfgfile, const char *weightfile, int *gpus, int ngpus, int clear, int dont_show, int calc_map, float thresh, float iou_thresh, int mjpeg_port, int show_imgs, int benchmark_layers, const char *chart_path)
 
void validate_detector (char *datacfg, char *cfgfile, char *weightfile, const char *outfile)
 
float validate_detector_map (const char *datacfg, const char *cfgfile, const char *weightfile, float thresh_calc_avg_iou, const float iou_thresh, const int map_points, int letter_box, Darknet::Network *existing_net)
 
void validate_detector_recall (char *datacfg, char *cfgfile, char *weightfile)
 

Variables

static int coco_ids [] = { 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90 }
 

Macro Definition Documentation

◆ __COMPAR_FN_T

#define __COMPAR_FN_T

Typedef Documentation

◆ __compar_fn_t

typedef int(* __compar_fn_t) (const void *, const void *)

Function Documentation

◆ anchors_comparator()

int anchors_comparator ( const void *  pa,
const void *  pb 
)

◆ anchors_data_comparator()

int anchors_data_comparator ( const float **  pa,
const float **  pb 
)
Here is the caller graph for this function:

◆ calc_anchors()

void calc_anchors ( char *  datacfg,
int  num_of_clusters,
int  width,
int  height,
int  show 
)
Todo:
shouldn't we check the .cfg file instead, and get the anchors, width, and height from there instead of requiring them as parms?
Todo:
replace qsort() lowest priority
Here is the call graph for this function:
Here is the caller graph for this function:

◆ eliminate_bdd()

static void eliminate_bdd ( char *  buf,
const char *  a 
)
static
Here is the caller graph for this function:

◆ get_bdd_image_id()

static void get_bdd_image_id ( char *  filename)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_bdd_detections()

static void print_bdd_detections ( FILE *  fp,
char *  image_path,
Darknet::Detection dets,
int  num_boxes,
int  classes,
int  w,
int  h 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_cocos()

static void print_cocos ( FILE *  fp,
char *  image_path,
Darknet::Detection dets,
int  num_boxes,
int  classes,
int  w,
int  h 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_detector_detections()

void print_detector_detections ( FILE **  fps,
const char *  id,
Darknet::Detection dets,
int  total,
int  classes,
int  w,
int  h 
)
Here is the caller graph for this function:

◆ print_imagenet_detections()

void print_imagenet_detections ( FILE *  fp,
int  id,
Darknet::Detection dets,
int  total,
int  classes,
int  w,
int  h 
)
Here is the caller graph for this function:

◆ print_kitti_detections()

static void print_kitti_detections ( FILE **  fps,
const char *  id,
Darknet::Detection dets,
int  total,
int  classes,
int  w,
int  h,
const char *  outfile,
const char *  prefix 
)
static
Here is the caller graph for this function:

◆ run_detector()

void run_detector ( int  argc,
char **  argv 
)
Todo:
get rid of the old C-style filename access and use std::filesystem::path within the functions so we're not passing these around as char* parms
Todo:
why only do this if ngpus > 1? Is this a bug? Should it be zero?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_detector()

void test_detector ( const char *  datacfg,
const char *  cfgfile,
const char *  weightfile,
const char *  filename,
float  thresh,
float  hier_thresh,
int  dont_show,
int  ext_output,
int  save_labels,
const char *  outfile,
int  letter_box,
int  benchmark_layers 
)
Here is the caller graph for this function:

◆ train_detector()

void train_detector ( const char *  datacfg,
const char *  cfgfile,
const char *  weightfile,
int *  gpus,
int  ngpus,
int  clear,
int  dont_show,
int  calc_map,
float  thresh,
float  iou_thresh,
int  mjpeg_port,
int  show_imgs,
int  benchmark_layers,
const char *  chart_path 
)
Todo:
copy the weights...?
Here is the caller graph for this function:

◆ validate_detector()

void validate_detector ( char *  datacfg,
char *  cfgfile,
char *  weightfile,
const char *  outfile 
)
Here is the caller graph for this function:

◆ validate_detector_map()

float validate_detector_map ( const char *  datacfg,
const char *  cfgfile,
const char *  weightfile,
float  thresh_calc_avg_iou,
const float  iou_thresh,
const int  map_points,
int  letter_box,
Darknet::Network existing_net 
)
Todo:
how many cores do we have available?
Todo:
I think this is TP + FN (where the object actually exists, and we either found it, or missed it)
Todo:
would we save anything if net was passed in by reference?
Here is the caller graph for this function:

◆ validate_detector_recall()

void validate_detector_recall ( char *  datacfg,
char *  cfgfile,
char *  weightfile 
)
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ coco_ids

int coco_ids[] = { 1,2,3,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,27,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,67,70,72,73,74,75,76,77,78,79,80,81,82,84,85,86,87,88,89,90 }
static