darknet  v3
Classes | Macros | Typedefs | Enumerations | Functions | Variables
darknet.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <pthread.h>
Include dependency graph for darknet.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  metadata
 
struct  tree
 
struct  update_args
 
struct  layer
 
struct  network
 
struct  augment_args
 
struct  image
 
struct  box
 
struct  detection
 
struct  matrix
 
struct  data
 
struct  load_args
 
struct  box_label
 
struct  node
 
struct  list
 

Macros

#define SECRET_NUM   -1234
 

Typedefs

typedef struct network network
 
typedef struct layer layer
 
typedef struct detection detection
 
typedef struct matrix matrix
 
typedef struct load_args load_args
 
typedef struct node node
 
typedef struct list list
 

Enumerations

enum  ACTIVATION {
  LOGISTIC, RELU, RELIE, LINEAR,
  RAMP, TANH, PLSE, LEAKY,
  ELU, LOGGY, STAIR, HARDTAN,
  LHTAN, SELU
}
 
enum  BINARY_ACTIVATION { MULT, ADD, SUB, DIV }
 
enum  LAYER_TYPE {
  CONVOLUTIONAL, DECONVOLUTIONAL, CONNECTED, MAXPOOL,
  SOFTMAX, DETECTION, DROPOUT, CROP,
  ROUTE, COST, NORMALIZATION, AVGPOOL,
  LOCAL, SHORTCUT, ACTIVE, RNN,
  GRU, LSTM, CRNN, BATCHNORM,
  NETWORK, XNOR, REGION, YOLO,
  ISEG, REORG, UPSAMPLE, LOGXENT,
  L2NORM, BLANK
}
 
enum  COST_TYPE {
  SSE, MASKED, L1, SEG,
  SMOOTH, WGAN
}
 
enum  learning_rate_policy {
  CONSTANT, STEP, EXP, POLY,
  STEPS, SIG, RANDOM
}
 
enum  data_type {
  CLASSIFICATION_DATA, DETECTION_DATA, CAPTCHA_DATA, REGION_DATA,
  IMAGE_DATA, COMPARE_DATA, WRITING_DATA, SWAG_DATA,
  TAG_DATA, OLD_CLASSIFICATION_DATA, STUDY_DATA, DET_DATA,
  SUPER_DATA, LETTERBOX_DATA, REGRESSION_DATA, SEGMENTATION_DATA,
  INSTANCE_DATA, ISEG_DATA
}
 

Functions

metadata get_metadata (char *file)
 
treeread_tree (char *filename)
 
void free_layer (layer)
 
networkload_network (char *cfg, char *weights, int clear)
 
load_args get_base_args (network *net)
 
void free_data (data d)
 
pthread_t load_data (load_args args)
 
listread_data_cfg (char *filename)
 
listread_cfg (char *filename)
 
unsigned char * read_file (char *filename)
 
data resize_data (data orig, int w, int h)
 
datatile_data (data orig, int divs, int size)
 
data select_data (data *orig, int *inds)
 
void forward_network (network *net)
 
void backward_network (network *net)
 
void update_network (network *net)
 
float dot_cpu (int N, float *X, int INCX, float *Y, int INCY)
 
void axpy_cpu (int N, float ALPHA, float *X, int INCX, float *Y, int INCY)
 
void copy_cpu (int N, float *X, int INCX, float *Y, int INCY)
 
void scal_cpu (int N, float ALPHA, float *X, int INCX)
 
void fill_cpu (int N, float ALPHA, float *X, int INCX)
 
void normalize_cpu (float *x, float *mean, float *variance, int batch, int filters, int spatial)
 
void softmax (float *input, int n, float temp, int stride, float *output)
 
int best_3d_shift_r (image a, image b, int min, int max)
 
image get_label (image **characters, char *string, int size)
 
void draw_label (image a, int r, int c, image label, const float *rgb)
 
void save_image_png (image im, const char *name)
 
void get_next_batch (data d, int n, int offset, float *X, float *y)
 
void grayscale_image_3c (image im)
 
void normalize_image (image p)
 
void matrix_to_csv (matrix m)
 
float train_network_sgd (network *net, data d, int n)
 
void rgbgr_image (image im)
 
data copy_data (data d)
 
data concat_data (data d1, data d2)
 
data load_cifar10_data (char *filename)
 
float matrix_topk_accuracy (matrix truth, matrix guess, int k)
 
void matrix_add_matrix (matrix from, matrix to)
 
void scale_matrix (matrix m, float scale)
 
matrix csv_to_matrix (char *filename)
 
float * network_accuracies (network *net, data d, int n)
 
float train_network_datum (network *net)
 
image make_random_image (int w, int h, int c)
 
void denormalize_connected_layer (layer l)
 
void denormalize_convolutional_layer (layer l)
 
void statistics_connected_layer (layer l)
 
void rescale_weights (layer l, float scale, float trans)
 
void rgbgr_weights (layer l)
 
imageget_weights (layer l)
 
void demo (char *cfgfile, char *weightfile, float thresh, int cam_index, const char *filename, char **names, int classes, int frame_skip, char *prefix, int avg, float hier_thresh, int w, int h, int fps, int fullscreen)
 
void get_detection_detections (layer l, int w, int h, float thresh, detection *dets)
 
char * option_find_str (list *l, char *key, char *def)
 
int option_find_int (list *l, char *key, int def)
 
int option_find_int_quiet (list *l, char *key, int def)
 
networkparse_network_cfg (char *filename)
 
void save_weights (network *net, char *filename)
 
void load_weights (network *net, char *filename)
 
void save_weights_upto (network *net, char *filename, int cutoff)
 
void load_weights_upto (network *net, char *filename, int start, int cutoff)
 
void zero_objectness (layer l)
 
void get_region_detections (layer l, int w, int h, int netw, int neth, float thresh, int *map, float tree_thresh, int relative, detection *dets)
 
int get_yolo_detections (layer l, int w, int h, int netw, int neth, float thresh, int *map, int relative, detection *dets)
 
void free_network (network *net)
 
void set_batch_network (network *net, int b)
 
void set_temp_network (network *net, float t)
 
image load_image (char *filename, int w, int h, int c)
 
image load_image_color (char *filename, int w, int h)
 
image make_image (int w, int h, int c)
 
image resize_image (image im, int w, int h)
 
void censor_image (image im, int dx, int dy, int w, int h)
 
image letterbox_image (image im, int w, int h)
 
image crop_image (image im, int dx, int dy, int w, int h)
 
image center_crop_image (image im, int w, int h)
 
image resize_min (image im, int min)
 
image resize_max (image im, int max)
 
image threshold_image (image im, float thresh)
 
image mask_to_rgb (image mask)
 
int resize_network (network *net, int w, int h)
 
void free_matrix (matrix m)
 
void test_resize (char *filename)
 
void save_image (image p, const char *name)
 
int show_image (image p, const char *name, int ms)
 
image copy_image (image p)
 
void draw_box_width (image a, int x1, int y1, int x2, int y2, int w, float r, float g, float b)
 
float get_current_rate (network *net)
 
void composite_3d (char *f1, char *f2, char *out, int delta)
 
data load_data_old (char **paths, int n, int m, char **labels, int k, int w, int h)
 
size_t get_current_batch (network *net)
 
void constrain_image (image im)
 
image get_network_image_layer (network *net, int i)
 
layer get_network_output_layer (network *net)
 
void top_predictions (network *net, int n, int *index)
 
void flip_image (image a)
 
image float_to_image (int w, int h, int c, float *data)
 
void ghost_image (image source, image dest, int dx, int dy)
 
float network_accuracy (network *net, data d)
 
void random_distort_image (image im, float hue, float saturation, float exposure)
 
void fill_image (image m, float s)
 
image grayscale_image (image im)
 
void rotate_image_cw (image im, int times)
 
double what_time_is_it_now ()
 
image rotate_image (image m, float rad)
 
void visualize_network (network *net)
 
float box_iou (box a, box b)
 
data load_all_cifar10 ()
 
box_labelread_boxes (char *filename, int *n)
 
box float_to_box (float *f, int stride)
 
void draw_detections (image im, detection *dets, int num, float thresh, char **names, image **alphabet, int classes)
 
matrix network_predict_data (network *net, data test)
 
image ** load_alphabet ()
 
image get_network_image (network *net)
 
float * network_predict (network *net, float *input)
 
int network_width (network *net)
 
int network_height (network *net)
 
float * network_predict_image (network *net, image im)
 
void network_detect (network *net, image im, float thresh, float hier_thresh, float nms, detection *dets)
 
detectionget_network_boxes (network *net, int w, int h, float thresh, float hier, int *map, int relative, int *num)
 
void free_detections (detection *dets, int n)
 
void reset_network_state (network *net, int b)
 
char ** get_labels (char *filename)
 
void do_nms_obj (detection *dets, int total, int classes, float thresh)
 
void do_nms_sort (detection *dets, int total, int classes, float thresh)
 
matrix make_matrix (int rows, int cols)
 
void free_image (image m)
 
float train_network (network *net, data d)
 
pthread_t load_data_in_thread (load_args args)
 
void load_data_blocking (load_args args)
 
listget_paths (char *filename)
 
void hierarchy_predictions (float *predictions, int n, tree *hier, int only_leaves, int stride)
 
void change_leaves (tree *t, char *leaf_list)
 
int find_int_arg (int argc, char **argv, char *arg, int def)
 
float find_float_arg (int argc, char **argv, char *arg, float def)
 
int find_arg (int argc, char *argv[], char *arg)
 
char * find_char_arg (int argc, char **argv, char *arg, char *def)
 
char * basecfg (char *cfgfile)
 
void find_replace (char *str, char *orig, char *rep, char *output)
 
void free_ptrs (void **ptrs, int n)
 
char * fgetl (FILE *fp)
 
void strip (char *s)
 
float sec (clock_t clocks)
 
void ** list_to_array (list *l)
 
void top_k (float *a, int n, int k, int *index)
 
int * read_map (char *filename)
 
void error (const char *s)
 
int max_index (float *a, int n)
 
int max_int_index (int *a, int n)
 
int sample_array (float *a, int n)
 
int * random_index_order (int min, int max)
 
void free_list (list *l)
 
float mse_array (float *a, int n)
 
float variance_array (float *a, int n)
 
float mag_array (float *a, int n)
 
void scale_array (float *a, int n, float s)
 
float mean_array (float *a, int n)
 
float sum_array (float *a, int n)
 
void normalize_array (float *a, int n)
 
int * read_intlist (char *s, int *n, int d)
 
size_t rand_size_t ()
 
float rand_normal ()
 
float rand_uniform (float min, float max)
 

Variables

int gpu_index
 

Macro Definition Documentation

◆ SECRET_NUM

#define SECRET_NUM   -1234

Definition at line 8 of file darknet.h.

Typedef Documentation

◆ detection

typedef struct detection detection

◆ layer

typedef struct layer layer

Definition at line 117 of file darknet.h.

◆ list

typedef struct list list

◆ load_args

typedef struct load_args load_args

◆ matrix

typedef struct matrix matrix

◆ network

typedef struct network network

Definition at line 114 of file darknet.h.

◆ node

typedef struct node node

Enumeration Type Documentation

◆ ACTIVATION

enum ACTIVATION
Enumerator
LOGISTIC 
RELU 
RELIE 
LINEAR 
RAMP 
TANH 
PLSE 
LEAKY 
ELU 
LOGGY 
STAIR 
HARDTAN 
LHTAN 
SELU 

Definition at line 56 of file darknet.h.

◆ BINARY_ACTIVATION

Enumerator
MULT 
ADD 
SUB 
DIV 

Definition at line 60 of file darknet.h.

◆ COST_TYPE

enum COST_TYPE
Enumerator
SSE 
MASKED 
L1 
SEG 
SMOOTH 
WGAN 

Definition at line 97 of file darknet.h.

◆ data_type

enum data_type
Enumerator
CLASSIFICATION_DATA 
DETECTION_DATA 
CAPTCHA_DATA 
REGION_DATA 
IMAGE_DATA 
COMPARE_DATA 
WRITING_DATA 
SWAG_DATA 
TAG_DATA 
OLD_CLASSIFICATION_DATA 
STUDY_DATA 
DET_DATA 
SUPER_DATA 
LETTERBOX_DATA 
REGRESSION_DATA 
SEGMENTATION_DATA 
INSTANCE_DATA 
ISEG_DATA 

Definition at line 547 of file darknet.h.

◆ LAYER_TYPE

enum LAYER_TYPE
Enumerator
CONVOLUTIONAL 
DECONVOLUTIONAL 
CONNECTED 
MAXPOOL 
SOFTMAX 
DETECTION 
DROPOUT 
CROP 
ROUTE 
COST 
NORMALIZATION 
AVGPOOL 
LOCAL 
SHORTCUT 
ACTIVE 
RNN 
GRU 
LSTM 
CRNN 
BATCHNORM 
NETWORK 
XNOR 
REGION 
YOLO 
ISEG 
REORG 
UPSAMPLE 
LOGXENT 
L2NORM 
BLANK 

Definition at line 64 of file darknet.h.

◆ learning_rate_policy

Enumerator
CONSTANT 
STEP 
EXP 
POLY 
STEPS 
SIG 
RANDOM 

Definition at line 430 of file darknet.h.

Function Documentation

◆ axpy_cpu()

void axpy_cpu ( int  N,
float  ALPHA,
float *  X,
int  INCX,
float *  Y,
int  INCY 
)

Definition at line 178 of file blas.c.

◆ backward_network()

void backward_network ( network net)

Definition at line 263 of file network.c.

◆ basecfg()

char* basecfg ( char *  cfgfile)

Definition at line 179 of file utils.c.

◆ best_3d_shift_r()

int best_3d_shift_r ( image  a,
image  b,
int  min,
int  max 
)

Definition at line 881 of file image.c.

◆ box_iou()

float box_iou ( box  a,
box  b 
)

Definition at line 179 of file box.c.

◆ censor_image()

void censor_image ( image  im,
int  dx,
int  dy,
int  w,
int  h 
)

Definition at line 411 of file image.c.

◆ center_crop_image()

image center_crop_image ( image  im,
int  w,
int  h 
)

Definition at line 796 of file image.c.

◆ change_leaves()

void change_leaves ( tree t,
char *  leaf_list 
)

Definition at line 7 of file tree.c.

◆ composite_3d()

void composite_3d ( char *  f1,
char *  f2,
char *  out,
int  delta 
)

Definition at line 913 of file image.c.

◆ concat_data()

data concat_data ( data  d1,
data  d2 
)

Definition at line 1382 of file data.c.

◆ constrain_image()

void constrain_image ( image  im)

Definition at line 456 of file image.c.

◆ copy_cpu()

void copy_cpu ( int  N,
float *  X,
int  INCX,
float *  Y,
int  INCY 
)

Definition at line 226 of file blas.c.

◆ copy_data()

data copy_data ( data  d)

Definition at line 1592 of file data.c.

◆ copy_image()

image copy_image ( image  p)

Definition at line 519 of file image.c.

◆ crop_image()

image crop_image ( image  im,
int  dx,
int  dy,
int  w,
int  h 
)

Definition at line 861 of file image.c.

◆ csv_to_matrix()

matrix csv_to_matrix ( char *  filename)

Definition at line 133 of file matrix.c.

◆ demo()

void demo ( char *  cfgfile,
char *  weightfile,
float  thresh,
int  cam_index,
const char *  filename,
char **  names,
int  classes,
int  frame_skip,
char *  prefix,
int  avg,
float  hier_thresh,
int  w,
int  h,
int  fps,
int  fullscreen 
)

Definition at line 359 of file demo.c.

◆ denormalize_connected_layer()

void denormalize_connected_layer ( layer  l)

Definition at line 199 of file connected_layer.c.

◆ denormalize_convolutional_layer()

void denormalize_convolutional_layer ( layer  l)

Definition at line 330 of file convolutional_layer.c.

◆ do_nms_obj()

void do_nms_obj ( detection dets,
int  total,
int  classes,
float  thresh 
)

Definition at line 21 of file box.c.

◆ do_nms_sort()

void do_nms_sort ( detection dets,
int  total,
int  classes,
float  thresh 
)

Definition at line 58 of file box.c.

◆ dot_cpu()

float dot_cpu ( int  N,
float *  X,
int  INCX,
float *  Y,
int  INCY 
)

Definition at line 297 of file blas.c.

◆ draw_box_width()

void draw_box_width ( image  a,
int  x1,
int  y1,
int  x2,
int  y2,
int  w,
float  r,
float  g,
float  b 
)

Definition at line 202 of file image.c.

◆ draw_detections()

void draw_detections ( image  im,
detection dets,
int  num,
float  thresh,
char **  names,
image **  alphabet,
int  classes 
)

Definition at line 239 of file image.c.

◆ draw_label()

void draw_label ( image  a,
int  r,
int  c,
image  label,
const float *  rgb 
)

Definition at line 149 of file image.c.

◆ error()

void error ( const char *  s)

Definition at line 253 of file utils.c.

◆ fgetl()

char* fgetl ( FILE *  fp)

Definition at line 335 of file utils.c.

◆ fill_cpu()

void fill_cpu ( int  N,
float  ALPHA,
float *  X,
int  INCX 
)

Definition at line 190 of file blas.c.

◆ fill_image()

void fill_image ( image  m,
float  s 
)

Definition at line 843 of file image.c.

◆ find_arg()

int find_arg ( int  argc,
char *  argv[],
char *  arg 
)

Definition at line 120 of file utils.c.

◆ find_char_arg()

char* find_char_arg ( int  argc,
char **  argv,
char *  arg,
char *  def 
)

Definition at line 163 of file utils.c.

◆ find_float_arg()

float find_float_arg ( int  argc,
char **  argv,
char *  arg,
float  def 
)

Definition at line 148 of file utils.c.

◆ find_int_arg()

int find_int_arg ( int  argc,
char **  argv,
char *  arg,
int  def 
)

Definition at line 133 of file utils.c.

◆ find_replace()

void find_replace ( char *  str,
char *  orig,
char *  rep,
char *  output 
)

Definition at line 216 of file utils.c.

◆ flip_image()

void flip_image ( image  a)

Definition at line 349 of file image.c.

◆ float_to_box()

box float_to_box ( float *  f,
int  stride 
)

Definition at line 91 of file box.c.

◆ float_to_image()

image float_to_image ( int  w,
int  h,
int  c,
float *  data 
)

Definition at line 774 of file image.c.

◆ forward_network()

void forward_network ( network net)

Definition at line 188 of file network.c.

◆ free_data()

void free_data ( data  d)

Definition at line 665 of file data.c.

◆ free_detections()

void free_detections ( detection dets,
int  n 
)

Definition at line 569 of file network.c.

◆ free_image()

void free_image ( image  m)

Definition at line 1614 of file image.c.

◆ free_layer()

void free_layer ( layer  )

Definition at line 6 of file layer.c.

◆ free_list()

void free_list ( list l)

Definition at line 67 of file list.c.

◆ free_matrix()

void free_matrix ( matrix  m)

Definition at line 10 of file matrix.c.

◆ free_network()

void free_network ( network net)

Definition at line 716 of file network.c.

◆ free_ptrs()

void free_ptrs ( void **  ptrs,
int  n 
)

Definition at line 328 of file utils.c.

◆ get_base_args()

load_args get_base_args ( network net)

Definition at line 35 of file network.c.

◆ get_current_batch()

size_t get_current_batch ( network net)

Definition at line 63 of file network.c.

◆ get_current_rate()

float get_current_rate ( network net)

Definition at line 90 of file network.c.

◆ get_detection_detections()

void get_detection_detections ( layer  l,
int  w,
int  h,
float  thresh,
detection dets 
)

Definition at line 225 of file detection_layer.c.

◆ get_label()

image get_label ( image **  characters,
char *  string,
int  size 
)

Definition at line 132 of file image.c.

◆ get_labels()

char** get_labels ( char *  filename)

Definition at line 657 of file data.c.

◆ get_metadata()

metadata get_metadata ( char *  file)

Definition at line 35 of file option_list.c.

◆ get_network_boxes()

detection* get_network_boxes ( network net,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
int *  num 
)

Definition at line 562 of file network.c.

◆ get_network_image()

image get_network_image ( network net)

Definition at line 466 of file network.c.

◆ get_network_image_layer()

image get_network_image_layer ( network net,
int  i 
)

Definition at line 453 of file network.c.

◆ get_network_output_layer()

layer get_network_output_layer ( network net)

Definition at line 699 of file network.c.

◆ get_next_batch()

void get_next_batch ( data  d,
int  n,
int  offset,
float *  X,
float *  y 
)

Definition at line 1459 of file data.c.

◆ get_paths()

list* get_paths ( char *  filename)

Definition at line 12 of file data.c.

◆ get_region_detections()

void get_region_detections ( layer  l,
int  w,
int  h,
int  netw,
int  neth,
float  thresh,
int *  map,
float  tree_thresh,
int  relative,
detection dets 
)

Definition at line 364 of file region_layer.c.

◆ get_weights()

image* get_weights ( layer  l)

Definition at line 591 of file convolutional_layer.c.

◆ get_yolo_detections()

int get_yolo_detections ( layer  l,
int  w,
int  h,
int  netw,
int  neth,
float  thresh,
int *  map,
int  relative,
detection dets 
)

Definition at line 316 of file yolo_layer.c.

◆ ghost_image()

void ghost_image ( image  source,
image  dest,
int  dx,
int  dy 
)

Definition at line 380 of file image.c.

◆ grayscale_image()

image grayscale_image ( image  im)

Definition at line 1212 of file image.c.

◆ grayscale_image_3c()

void grayscale_image_3c ( image  im)

Definition at line 1194 of file image.c.

◆ hierarchy_predictions()

void hierarchy_predictions ( float *  predictions,
int  n,
tree hier,
int  only_leaves,
int  stride 
)

Definition at line 37 of file tree.c.

◆ letterbox_image()

image letterbox_image ( image  im,
int  w,
int  h 
)

Definition at line 964 of file image.c.

◆ list_to_array()

void** list_to_array ( list l)

Definition at line 82 of file list.c.

◆ load_all_cifar10()

data load_all_cifar10 ( )

Definition at line 1481 of file data.c.

◆ load_alphabet()

image** load_alphabet ( )

Definition at line 223 of file image.c.

◆ load_cifar10_data()

data load_cifar10_data ( char *  filename)

Definition at line 1422 of file data.c.

◆ load_data()

pthread_t load_data ( load_args  args)

Definition at line 1180 of file data.c.

◆ load_data_blocking()

void load_data_blocking ( load_args  args)

Definition at line 1173 of file data.c.

◆ load_data_in_thread()

pthread_t load_data_in_thread ( load_args  args)

Definition at line 1135 of file data.c.

◆ load_data_old()

data load_data_old ( char **  paths,
int  n,
int  m,
char **  labels,
int  k,
int  w,
int  h 
)

Definition at line 1204 of file data.c.

◆ load_image()

image load_image ( char *  filename,
int  w,
int  h,
int  c 
)

Definition at line 1470 of file image.c.

◆ load_image_color()

image load_image_color ( char *  filename,
int  w,
int  h 
)

Definition at line 1486 of file image.c.

◆ load_network()

network* load_network ( char *  cfg,
char *  weights,
int  clear 
)

Definition at line 53 of file network.c.

◆ load_weights()

void load_weights ( network net,
char *  filename 
)

Definition at line 1308 of file parser.c.

◆ load_weights_upto()

void load_weights_upto ( network net,
char *  filename,
int  start,
int  cutoff 
)

Definition at line 1218 of file parser.c.

◆ mag_array()

float mag_array ( float *  a,
int  n 
)

Definition at line 574 of file utils.c.

◆ make_image()

image make_image ( int  w,
int  h,
int  c 
)

Definition at line 756 of file image.c.

◆ make_matrix()

matrix make_matrix ( int  rows,
int  cols 
)

Definition at line 91 of file matrix.c.

◆ make_random_image()

image make_random_image ( int  w,
int  h,
int  c 
)

Definition at line 763 of file image.c.

◆ mask_to_rgb()

image mask_to_rgb ( image  mask)

Definition at line 28 of file image.c.

◆ matrix_add_matrix()

void matrix_add_matrix ( matrix  from,
matrix  to 
)

Definition at line 66 of file matrix.c.

◆ matrix_to_csv()

void matrix_to_csv ( matrix  m)

Definition at line 161 of file matrix.c.

◆ matrix_topk_accuracy()

float matrix_topk_accuracy ( matrix  truth,
matrix  guess,
int  k 
)

Definition at line 17 of file matrix.c.

◆ max_index()

int max_index ( float *  a,
int  n 
)

Definition at line 619 of file utils.c.

◆ max_int_index()

int max_int_index ( int *  a,
int  n 
)

Definition at line 605 of file utils.c.

◆ mean_array()

float mean_array ( float *  a,
int  n 
)

Definition at line 487 of file utils.c.

◆ mse_array()

float mse_array ( float *  a,
int  n 
)

Definition at line 546 of file utils.c.

◆ network_accuracies()

float* network_accuracies ( network net,
data  d,
int  n 
)

Definition at line 689 of file network.c.

◆ network_accuracy()

float network_accuracy ( network net,
data  d 
)

Definition at line 681 of file network.c.

◆ network_detect()

void network_detect ( network net,
image  im,
float  thresh,
float  hier_thresh,
float  nms,
detection dets 
)

◆ network_height()

int network_height ( network net)

Definition at line 589 of file network.c.

◆ network_predict()

float* network_predict ( network net,
float *  input 
)

Definition at line 497 of file network.c.

◆ network_predict_data()

matrix network_predict_data ( network net,
data  test 
)

Definition at line 616 of file network.c.

◆ network_predict_image()

float* network_predict_image ( network net,
image  im 
)

Definition at line 579 of file network.c.

◆ network_width()

int network_width ( network net)

Definition at line 588 of file network.c.

◆ normalize_array()

void normalize_array ( float *  a,
int  n 
)

Definition at line 554 of file utils.c.

◆ normalize_cpu()

void normalize_cpu ( float *  x,
float *  mean,
float *  variance,
int  batch,
int  filters,
int  spatial 
)

Definition at line 147 of file blas.c.

◆ normalize_image()

void normalize_image ( image  p)

Definition at line 465 of file image.c.

◆ option_find_int()

int option_find_int ( list l,
char *  key,
int  def 
)

Definition at line 112 of file option_list.c.

◆ option_find_int_quiet()

int option_find_int_quiet ( list l,
char *  key,
int  def 
)

Definition at line 120 of file option_list.c.

◆ option_find_str()

char* option_find_str ( list l,
char *  key,
char *  def 
)

Definition at line 104 of file option_list.c.

◆ parse_network_cfg()

network* parse_network_cfg ( char *  filename)

Definition at line 742 of file parser.c.

◆ rand_normal()

float rand_normal ( )

Definition at line 654 of file utils.c.

◆ rand_size_t()

size_t rand_size_t ( )

Definition at line 686 of file utils.c.

◆ rand_uniform()

float rand_uniform ( float  min,
float  max 
)

Definition at line 698 of file utils.c.

◆ random_distort_image()

void random_distort_image ( image  im,
float  hue,
float  saturation,
float  exposure 
)

Definition at line 1334 of file image.c.

◆ random_index_order()

int* random_index_order ( int  min,
int  max 
)

Definition at line 97 of file utils.c.

◆ read_boxes()

box_label* read_boxes ( char *  filename,
int *  n 
)

Definition at line 139 of file data.c.

◆ read_cfg()

list * read_cfg ( char *  filename)

Definition at line 891 of file parser.c.

◆ read_data_cfg()

list* read_data_cfg ( char *  filename)

Definition at line 7 of file option_list.c.

◆ read_file()

unsigned char* read_file ( char *  filename)

Definition at line 260 of file utils.c.

◆ read_intlist()

int* read_intlist ( char *  s,
int *  n,
int  d 
)

Definition at line 36 of file utils.c.

◆ read_map()

int* read_map ( char *  filename)

Definition at line 59 of file utils.c.

◆ read_tree()

tree* read_tree ( char *  filename)

Definition at line 83 of file tree.c.

◆ rescale_weights()

void rescale_weights ( layer  l,
float  scale,
float  trans 
)

Definition at line 578 of file convolutional_layer.c.

◆ reset_network_state()

void reset_network_state ( network net,
int  b 
)

Definition at line 69 of file network.c.

◆ resize_data()

data resize_data ( data  orig,
int  w,
int  h 
)

Definition at line 1320 of file data.c.

◆ resize_image()

image resize_image ( image  im,
int  w,
int  h 
)

Definition at line 1351 of file image.c.

◆ resize_max()

image resize_max ( image  im,
int  max 
)

Definition at line 985 of file image.c.

◆ resize_min()

image resize_min ( image  im,
int  min 
)

Definition at line 1001 of file image.c.

◆ resize_network()

int resize_network ( network net,
int  w,
int  h 
)

Definition at line 358 of file network.c.

◆ rgbgr_image()

void rgbgr_image ( image  im)

Definition at line 527 of file image.c.

◆ rgbgr_weights()

void rgbgr_weights ( layer  l)

Definition at line 567 of file convolutional_layer.c.

◆ rotate_image()

image rotate_image ( image  m,
float  rad 
)

Definition at line 824 of file image.c.

◆ rotate_image_cw()

void rotate_image_cw ( image  im,
int  times 
)

Definition at line 328 of file image.c.

◆ sample_array()

int sample_array ( float *  a,
int  n 
)

Definition at line 592 of file utils.c.

◆ save_image()

void save_image ( image  p,
const char *  name 
)

Definition at line 717 of file image.c.

◆ save_image_png()

void save_image_png ( image  im,
const char *  name 
)

Definition at line 700 of file image.c.

◆ save_weights()

void save_weights ( network net,
char *  filename 
)

Definition at line 1080 of file parser.c.

◆ save_weights_upto()

void save_weights_upto ( network net,
char *  filename,
int  cutoff 
)

Definition at line 1007 of file parser.c.

◆ scal_cpu()

void scal_cpu ( int  N,
float  ALPHA,
float *  X,
int  INCX 
)

Definition at line 184 of file blas.c.

◆ scale_array()

void scale_array ( float *  a,
int  n,
float  s 
)

Definition at line 584 of file utils.c.

◆ scale_matrix()

void scale_matrix ( matrix  m,
float  scale 
)

Definition at line 37 of file matrix.c.

◆ sec()

float sec ( clock_t  clocks)

Definition at line 232 of file utils.c.

◆ select_data()

data select_data ( data orig,
int *  inds 
)

Definition at line 1270 of file data.c.

◆ set_batch_network()

void set_batch_network ( network net,
int  b 
)

Definition at line 339 of file network.c.

◆ set_temp_network()

void set_temp_network ( network net,
float  t 
)

Definition at line 330 of file network.c.

◆ show_image()

int show_image ( image  p,
const char *  name,
int  ms 
)

Definition at line 575 of file image.c.

◆ softmax()

void softmax ( float *  input,
int  n,
float  temp,
int  stride,
float *  output 
)

Definition at line 305 of file blas.c.

◆ statistics_connected_layer()

void statistics_connected_layer ( layer  l)

Definition at line 215 of file connected_layer.c.

◆ strip()

void strip ( char *  s)

Definition at line 302 of file utils.c.

◆ sum_array()

float sum_array ( float *  a,
int  n 
)

Definition at line 479 of file utils.c.

◆ test_resize()

void test_resize ( char *  filename)

Definition at line 1396 of file image.c.

◆ threshold_image()

image threshold_image ( image  im,
float  thresh 
)

Definition at line 1228 of file image.c.

◆ tile_data()

data* tile_data ( data  orig,
int  divs,
int  size 
)

Definition at line 1293 of file data.c.

◆ top_k()

void top_k ( float *  a,
int  n,
int  k,
int *  index 
)

Definition at line 237 of file utils.c.

◆ top_predictions()

void top_predictions ( network net,
int  n,
int *  index 
)

Definition at line 491 of file network.c.

◆ train_network()

float train_network ( network net,
data  d 
)

Definition at line 314 of file network.c.

◆ train_network_datum()

float train_network_datum ( network net)

Definition at line 289 of file network.c.

◆ train_network_sgd()

float train_network_sgd ( network net,
data  d,
int  n 
)

Definition at line 300 of file network.c.

◆ update_network()

void update_network ( network net)

Definition at line 213 of file network.c.

◆ variance_array()

float variance_array ( float *  a,
int  n 
)

Definition at line 514 of file utils.c.

◆ visualize_network()

void visualize_network ( network net)

Definition at line 477 of file network.c.

◆ what_time_is_it_now()

double what_time_is_it_now ( )

Definition at line 27 of file utils.c.

◆ zero_objectness()

void zero_objectness ( layer  l)

Definition at line 497 of file region_layer.c.

Variable Documentation

◆ gpu_index

int gpu_index

Definition at line 1 of file cuda.c.