Darknet/YOLO v3.0-93-gfbbaca7
Object Detection Framework
 
Loading...
Searching...
No Matches
network.cpp File Reference
Include dependency graph for network.cpp:

Functions

void backward_network (network net, Darknet::NetworkState state)
 
void calculate_binary_weights (network net)
 
network combine_train_valid_networks (network net_train, network net_map)
 
void compare_networks (network n1, network n2, data test)
 
void copy_cudnn_descriptors (const Darknet::Layer &src, Darknet::Layer *dst)
 
void copy_weights_net (network net_train, network *net_map)
 
void custom_get_region_detections (const Darknet::Layer &l, int w, int h, int net_w, int net_h, float thresh, int *map, float hier, int relative, detection *dets, int letter)
 
char * detection_to_json (detection *dets, int nboxes, int classes, char **names, long long int frame_id, char *filename)
 
void ema_apply (network net)
 
void ema_update (network net, float ema_alpha)
 
void fill_network_boxes (network *net, int w, int h, float thresh, float hier, int *map, int relative, detection *dets, int letter)
 
void fill_network_boxes_batch (network *net, int w, int h, float thresh, float hier, int *map, int relative, detection *dets, int letter, int batch)
 
void fill_network_boxes_v3 (network *net, int w, int h, float thresh, float hier, int *map, int relative, detection *dets, int letter, Darknet::Output_Object_Cache &cache)
 
void forward_blank_layer (Darknet::Layer &l, Darknet::NetworkState state)
 
void forward_network (network net, Darknet::NetworkState state)
 
void free_batch_detections (det_num_pair *det_num_pairs, int n)
 
void free_detections (detection *dets, int n)
 
void free_network (network net)
 
void free_network_ptr (network *net)
 
void free_network_recurrent_state (network net)
 
void fuse_conv_batchnorm (network net)
 
int get_current_batch (network net)
 
int64_t get_current_iteration (network net)
 
float get_current_rate (network net)
 
float get_current_seq_subdivisions (network net)
 
detectionget_network_boxes (network *net, int w, int h, float thresh, float hier, int *map, int relative, int *num, int letter)
 
float get_network_cost (network net)
 
Darknet::Image get_network_image (network net)
 
Darknet::Image get_network_image_layer (network net, int i)
 
int get_network_input_size (network net)
 
Darknet::Layerget_network_layer (network *net, int i)
 
float * get_network_output (network net)
 
int get_network_output_size (network net)
 
int get_predicted_class_network (network net)
 
int get_sequence_value (network net)
 
int is_ema_initialized (network net)
 
static float lrelu (float src)
 
network make_network (int n)
 
detectionmake_network_boxes (network *net, float thresh, int *num)
 
detectionmake_network_boxes_batch (network *net, float thresh, int *num, int batch)
 
detectionmake_network_boxes_v3 (network *net, const float thresh, int *num, Darknet::Output_Object_Cache &cache)
 
float * network_accuracies (network net, data d, int n)
 
float network_accuracy (network net, data d)
 
float network_accuracy_multi (network net, data d, int n)
 
int network_height (network *net)
 
float * network_predict (network net, float *input)
 
det_num_pairnetwork_predict_batch (network *net, Darknet::Image im, int batch_size, int w, int h, float thresh, float hier, int *map, int relative, int letter)
 
matrix network_predict_data (network net, data test)
 
matrix network_predict_data_multi (network net, data test, int n)
 
float * network_predict_image (network *net, Darknet::Image im)
 
float * network_predict_image_letterbox (network *net, Darknet::Image im)
 
float * network_predict_ptr (network *net, float *input)
 
int network_width (network *net)
 
int num_detections (network *net, float thresh)
 
int num_detections_batch (network *net, float thresh, int batch)
 
int num_detections_v3 (network *net, float thresh, Darknet::Output_Object_Cache &cache)
 
void print_network (network net)
 
void randomize_network_recurrent_state (network net)
 
int recalculate_workspace_size (network *net)
 
void reject_similar_weights (network net, float sim_threshold)
 
void remember_network_recurrent_state (network net)
 
void reset_network_state (network *net, int b)
 
void reset_rnn (network *net)
 
int resize_network (network *net, int w, int h)
 
void restore_network_recurrent_state (network net)
 
void set_batch_network (network *net, int b)
 
void top_predictions (network net, int k, int *index)
 
float train_network (network net, data d)
 
float train_network_batch (network net, data d, int n)
 
float train_network_datum (network net, float *x, float *y)
 
float train_network_waitkey (network net, data d, int wait_key)
 
void update_network (network net)
 
void visualize_network (network net)
 

Function Documentation

◆ backward_network()

void backward_network ( network  net,
Darknet::NetworkState  state 
)
Here is the caller graph for this function:

◆ calculate_binary_weights()

void calculate_binary_weights ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ combine_train_valid_networks()

network combine_train_valid_networks ( network  net_train,
network  net_map 
)
Here is the call graph for this function:

◆ compare_networks()

void compare_networks ( network  n1,
network  n2,
data  test 
)
Here is the call graph for this function:

◆ copy_cudnn_descriptors()

void copy_cudnn_descriptors ( const Darknet::Layer src,
Darknet::Layer dst 
)
Here is the caller graph for this function:

◆ copy_weights_net()

void copy_weights_net ( network  net_train,
network net_map 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ custom_get_region_detections()

void custom_get_region_detections ( const Darknet::Layer l,
int  w,
int  h,
int  net_w,
int  net_h,
float  thresh,
int *  map,
float  hier,
int  relative,
detection dets,
int  letter 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detection_to_json()

char * detection_to_json ( detection dets,
int  nboxes,
int  classes,
char **  names,
long long int  frame_id,
char *  filename 
)
Here is the caller graph for this function:

◆ ema_apply()

void ema_apply ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ema_update()

void ema_update ( network  net,
float  ema_alpha 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_network_boxes()

void fill_network_boxes ( network net,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
detection dets,
int  letter 
)
Todo:
V3 JAZZ 845 milliseconds
Todo:
V3 JAZZ 830 milliseconds: most of the time is spent in this function
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_network_boxes_batch()

void fill_network_boxes_batch ( network net,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
detection dets,
int  letter,
int  batch 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_network_boxes_v3()

void fill_network_boxes_v3 ( network net,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
detection dets,
int  letter,
Darknet::Output_Object_Cache cache 
)
Todo:
V3 JAZZ 79 milliseconds
Todo:
This assumes that "GAUSSIAN_YOLO", "REGION", and "DETECTION" layers don't exist, which is wrong. But they only exist in much older configurations which are hopefully not used anymore? Should we deprecate these?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ forward_blank_layer()

void forward_blank_layer ( Darknet::Layer l,
Darknet::NetworkState  state 
)
Here is the caller graph for this function:

◆ forward_network()

void forward_network ( network  net,
Darknet::NetworkState  state 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_batch_detections()

void free_batch_detections ( det_num_pair det_num_pairs,
int  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_detections()

void free_detections ( detection dets,
int  n 
)
Here is the caller graph for this function:

◆ free_network()

void free_network ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_network_ptr()

void free_network_ptr ( network net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_network_recurrent_state()

void free_network_recurrent_state ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fuse_conv_batchnorm()

void fuse_conv_batchnorm ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_current_batch()

int get_current_batch ( network  net)
Here is the caller graph for this function:

◆ get_current_iteration()

int64_t get_current_iteration ( network  net)
Here is the caller graph for this function:

◆ get_current_rate()

float get_current_rate ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_current_seq_subdivisions()

float get_current_seq_subdivisions ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_boxes()

detection * get_network_boxes ( network net,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
int *  num,
int  letter 
)
Todo:
V3 JAZZ 808 milliseconds
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_cost()

float get_network_cost ( network  net)
Here is the caller graph for this function:

◆ get_network_image()

Darknet::Image get_network_image ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_image_layer()

Darknet::Image get_network_image_layer ( network  net,
int  i 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_input_size()

int get_network_input_size ( network  net)
Here is the caller graph for this function:

◆ get_network_layer()

Darknet::Layer * get_network_layer ( network net,
int  i 
)

◆ get_network_output()

float * get_network_output ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_network_output_size()

int get_network_output_size ( network  net)
Here is the caller graph for this function:

◆ get_predicted_class_network()

int get_predicted_class_network ( network  net)
Here is the call graph for this function:

◆ get_sequence_value()

int get_sequence_value ( network  net)
Here is the caller graph for this function:

◆ is_ema_initialized()

int is_ema_initialized ( network  net)
Here is the caller graph for this function:

◆ lrelu()

static float lrelu ( float  src)
static
Here is the caller graph for this function:

◆ make_network()

network make_network ( int  n)
Here is the caller graph for this function:

◆ make_network_boxes()

detection * make_network_boxes ( network net,
float  thresh,
int *  num 
)
See also
make_network_boxes_batch()
Todo:
V3 JAZZ 766 milliseconds
Todo:
V3 JAZZ 740 milliseconds – this is where we spend all our time
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_network_boxes_batch()

detection * make_network_boxes_batch ( network net,
float  thresh,
int *  num,
int  batch 
)
See also
make_network_boxes()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_network_boxes_v3()

detection * make_network_boxes_v3 ( network net,
const float  thresh,
int *  num,
Darknet::Output_Object_Cache cache 
)
Todo:
V3 JAZZ 718 milliseconds
Todo:
Is anything but YOLO still used as an output layer in a modern .cfg file? Should these be removed?
Todo:
V3 JAZZ 694 milliseconds meaning 97% of this function is spent in this next line
Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_accuracies()

float * network_accuracies ( network  net,
data  d,
int  n 
)
Here is the call graph for this function:

◆ network_accuracy()

float network_accuracy ( network  net,
data  d 
)
Here is the call graph for this function:

◆ network_accuracy_multi()

float network_accuracy_multi ( network  net,
data  d,
int  n 
)
Here is the call graph for this function:

◆ network_height()

int network_height ( network net)
Here is the caller graph for this function:

◆ network_predict()

float * network_predict ( network  net,
float *  input 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_predict_batch()

det_num_pair * network_predict_batch ( network net,
Darknet::Image  im,
int  batch_size,
int  w,
int  h,
float  thresh,
float  hier,
int *  map,
int  relative,
int  letter 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_predict_data()

matrix network_predict_data ( network  net,
data  test 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_predict_data_multi()

matrix network_predict_data_multi ( network  net,
data  test,
int  n 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ network_predict_image()

float * network_predict_image ( network net,
Darknet::Image  im 
)
Here is the call graph for this function:

◆ network_predict_image_letterbox()

float * network_predict_image_letterbox ( network net,
Darknet::Image  im 
)
Here is the call graph for this function:

◆ network_predict_ptr()

float * network_predict_ptr ( network net,
float *  input 
)
Here is the call graph for this function:

◆ network_width()

int network_width ( network net)
Here is the caller graph for this function:

◆ num_detections()

int num_detections ( network net,
float  thresh 
)
Todo:
V3 JAZZ 740 milliseconds
Todo:
V3 JAZZ 725 milliseconds – this is where we spend all our time
Here is the call graph for this function:
Here is the caller graph for this function:

◆ num_detections_batch()

int num_detections_batch ( network net,
float  thresh,
int  batch 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ num_detections_v3()

int num_detections_v3 ( network net,
float  thresh,
Darknet::Output_Object_Cache cache 
)
Todo:
V3 JAZZ 694 milliseconds
Todo:
V3 JAZZ 687 milliseconds – this is where we spend all our time
Todo:
Is this still used in a modern .cfg file? Should it be removed?
Todo:
Is this still used in a modern .cfg file? Should it be removed?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_network()

void print_network ( network  net)
Here is the call graph for this function:

◆ randomize_network_recurrent_state()

void randomize_network_recurrent_state ( network  net)
Here is the call graph for this function:

◆ recalculate_workspace_size()

int recalculate_workspace_size ( network net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reject_similar_weights()

void reject_similar_weights ( network  net,
float  sim_threshold 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ remember_network_recurrent_state()

void remember_network_recurrent_state ( network  net)
Here is the caller graph for this function:

◆ reset_network_state()

void reset_network_state ( network net,
int  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_rnn()

void reset_rnn ( network net)
Here is the call graph for this function:

◆ resize_network()

int resize_network ( network net,
int  w,
int  h 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ restore_network_recurrent_state()

void restore_network_recurrent_state ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_batch_network()

void set_batch_network ( network net,
int  b 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ top_predictions()

void top_predictions ( network  net,
int  k,
int *  index 
)
Here is the call graph for this function:

◆ train_network()

float train_network ( network  net,
data  d 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ train_network_batch()

float train_network_batch ( network  net,
data  d,
int  n 
)
Here is the call graph for this function:

◆ train_network_datum()

float train_network_datum ( network  net,
float *  x,
float *  y 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ train_network_waitkey()

float train_network_waitkey ( network  net,
data  d,
int  wait_key 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_network()

void update_network ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ visualize_network()

void visualize_network ( network  net)
Here is the call graph for this function:
Here is the caller graph for this function: