| | |
| | |
|
| | | // activations.h
|
| | | typedef enum {
|
| | | LOGISTIC, RELU, RELU6, RELIE, LINEAR, RAMP, TANH, PLSE, LEAKY, ELU, LOGGY, STAIR, HARDTAN, LHTAN, SELU, GELU, SWISH, MISH, NORM_CHAN, NORM_CHAN_SOFTMAX, NORM_CHAN_SOFTMAX_MAXVAL
|
| | | LOGISTIC, RELU, RELU6, RELIE, LINEAR, RAMP, TANH, PLSE, REVLEAKY, LEAKY, ELU, LOGGY, STAIR, HARDTAN, LHTAN, SELU, GELU, SWISH, MISH, HARD_MISH, NORM_CHAN, NORM_CHAN_SOFTMAX, NORM_CHAN_SOFTMAX_MAXVAL |
| | | }ACTIVATION;
|
| | |
|
| | | // parser.h
|
| | |
| | | MULT, ADD, SUB, DIV
|
| | | } BINARY_ACTIVATION;
|
| | |
|
| | | // blas.h |
| | | typedef struct contrastive_params { |
| | | float sim; |
| | | float exp_sim; |
| | | float P; |
| | | int i, j; |
| | | int time_step_i, time_step_j; |
| | | } contrastive_params; |
| | | |
| | | |
| | | // layer.h
|
| | | typedef enum {
|
| | | CONVOLUTIONAL,
|
| | |
| | | GRU,
|
| | | LSTM,
|
| | | CONV_LSTM,
|
| | | HISTORY, |
| | | CRNN,
|
| | | BATCHNORM,
|
| | | NETWORK,
|
| | |
| | | LOGXENT,
|
| | | L2NORM,
|
| | | EMPTY,
|
| | | BLANK
|
| | | BLANK, |
| | | CONTRASTIVE, |
| | | IMPLICIT |
| | | } LAYER_TYPE;
|
| | |
|
| | | // layer.h
|
| | |
| | | struct layer {
|
| | | LAYER_TYPE type;
|
| | | ACTIVATION activation;
|
| | | ACTIVATION lstm_activation; |
| | | COST_TYPE cost_type;
|
| | | void(*forward) (struct layer, struct network_state);
|
| | | void(*backward) (struct layer, struct network_state);
|
| | |
| | | int out_h, out_w, out_c;
|
| | | int n;
|
| | | int max_boxes;
|
| | | int truth_size; |
| | | int groups;
|
| | | int group_id;
|
| | | int size;
|
| | |
| | | int dilation;
|
| | | int antialiasing;
|
| | | int maxpool_depth;
|
| | | int maxpool_zero_nonmax; |
| | | int out_channels;
|
| | | int reverse;
|
| | | float reverse; |
| | | int coordconv; |
| | | int flatten;
|
| | | int spatial;
|
| | | int pad;
|
| | |
| | | int keep_delta_gpu;
|
| | | int optimized_memory;
|
| | | int steps;
|
| | | int history_size; |
| | | int bottleneck; |
| | | float time_normalizer; |
| | | int state_constrain;
|
| | | int hidden;
|
| | | int truth;
|
| | |
| | | int noloss;
|
| | | int softmax;
|
| | | int classes;
|
| | | int detection; |
| | | int embedding_layer_id; |
| | | float *embedding_output; |
| | | int embedding_size; |
| | | float sim_thresh; |
| | | int track_history_size; |
| | | int dets_for_track; |
| | | int dets_for_show; |
| | | float track_ciou_norm; |
| | | int coords;
|
| | | int background;
|
| | | int rescore;
|
| | |
| | | float ** sums;
|
| | | float * rand;
|
| | | float * cost;
|
| | | int *labels; |
| | | int *class_ids; |
| | | int contrastive_neg_max; |
| | | float *cos_sim; |
| | | float *exp_cos_sim; |
| | | float *p_constrastive; |
| | | contrastive_params *contrast_p_gpu; |
| | | float * state;
|
| | | float * prev_state;
|
| | | float * forgot_state;
|
| | |
| | | float *scales;
|
| | | float *scale_updates;
|
| | |
|
| | | float *weights_ema; |
| | | float *biases_ema; |
| | | float *scales_ema; |
| | | |
| | | float *weights;
|
| | | float *weight_updates;
|
| | |
|
| | | float scale_x_y;
|
| | | int objectness_smooth;
|
| | | int new_coords; |
| | | int show_details; |
| | | float max_delta;
|
| | | float uc_normalizer;
|
| | | float iou_normalizer;
|
| | | float obj_normalizer; |
| | | float cls_normalizer;
|
| | | float delta_normalizer; |
| | | IOU_LOSS iou_loss;
|
| | | IOU_LOSS iou_thresh_kind;
|
| | | NMS_KIND nms_kind;
|
| | |
| | | //#ifdef GPU
|
| | | int *indexes_gpu;
|
| | |
|
| | | int stream; |
| | | int wait_stream_id; |
| | | |
| | | float *z_gpu;
|
| | | float *r_gpu;
|
| | | float *h_gpu;
|
| | | float *stored_h_gpu;
|
| | | float *bottelneck_hi_gpu; |
| | | float *bottelneck_delta_gpu; |
| | |
|
| | | float *temp_gpu;
|
| | | float *temp2_gpu;
|
| | |
| | | float * activation_input_gpu;
|
| | | float * loss_gpu;
|
| | | float * delta_gpu;
|
| | | float * cos_sim_gpu; |
| | | float * rand_gpu;
|
| | | float * drop_blocks_scale;
|
| | | float * drop_blocks_scale_gpu;
|
| | |
| | | int n;
|
| | | int batch;
|
| | | uint64_t *seen;
|
| | | float *badlabels_reject_threshold; |
| | | float *delta_rolling_max; |
| | | float *delta_rolling_avg; |
| | | float *delta_rolling_std; |
| | | int weights_reject_freq; |
| | | int equidistant_point; |
| | | float badlabels_rejection_percentage; |
| | | float num_sigmas_reject_badlabels; |
| | | float ema_alpha; |
| | | int *cur_iteration;
|
| | | float loss_scale;
|
| | | int *t;
|
| | |
| | | float *output;
|
| | | learning_rate_policy policy;
|
| | | int benchmark_layers;
|
| | | int *total_bbox; |
| | | int *rewritten_bbox; |
| | |
|
| | | float learning_rate;
|
| | | float learning_rate_min;
|
| | |
| | | int attention;
|
| | | int adversarial;
|
| | | float adversarial_lr;
|
| | | float max_chart_loss; |
| | | int letter_box;
|
| | | int mosaic_bound; |
| | | int contrastive; |
| | | int contrastive_jit_flip; |
| | | int contrastive_color; |
| | | int unsupervised; |
| | | float angle;
|
| | | float aspect;
|
| | | float exposure;
|
| | |
| | | size_t *max_input16_size;
|
| | | size_t *max_output16_size;
|
| | | int wait_stream;
|
| | | |
| | | void *cuda_graph; |
| | | void *cuda_graph_exec; |
| | | int use_cuda_graph; |
| | | int *cuda_graph_ready; |
| | |
|
| | | float *global_delta_gpu;
|
| | | float *state_delta_gpu;
|
| | |
| | | int sort_class;
|
| | | float *uc; // Gaussian_YOLOv3 - tx,ty,tw,th uncertainty
|
| | | int points; // bit-0 - center, bit-1 - top-left-corner, bit-2 - bottom-right-corner
|
| | | float *embeddings; // embeddings for tracking |
| | | int embedding_size; |
| | | float sim; |
| | | int track_id; |
| | | } detection;
|
| | |
|
| | | // network.c -batch inference
|
| | |
| | | int nh;
|
| | | int nw;
|
| | | int num_boxes;
|
| | | int truth_size; |
| | | int min, max, size;
|
| | | int classes;
|
| | | int background;
|
| | |
| | | int track;
|
| | | int augment_speed;
|
| | | int letter_box;
|
| | | int mosaic_bound; |
| | | int show_imgs;
|
| | | int dontuse_opencv;
|
| | | int contrastive; |
| | | int contrastive_jit_flip; |
| | | int contrastive_color; |
| | | float jitter;
|
| | | float resize;
|
| | | int flip;
|
| | |
| | | // data.h
|
| | | typedef struct box_label {
|
| | | int id;
|
| | | int track_id; |
| | | float x, y, w, h;
|
| | | float left, right, top, bottom;
|
| | | } box_label;
|
| | |
| | | // node *front;
|
| | | // node *back;
|
| | | //} list;
|
| | |
|
| | | // -----------------------------------------------------
|
| | |
|
| | |
|
| | |
| | | LIB_API network *load_network_custom(char *cfg, char *weights, int clear, int batch);
|
| | | LIB_API network *load_network(char *cfg, char *weights, int clear);
|
| | | LIB_API void free_network(network net);
|
| | | LIB_API void free_network_ptr(network* net); |
| | |
|
| | | // network.c
|
| | | LIB_API load_args get_base_args(network *net);
|
| | |
| | | void stop_timer_and_show_name(char *name);
|
| | | void show_total_time();
|
| | |
|
| | | LIB_API void set_track_id(detection *new_dets, int new_dets_num, float thresh, float sim_thresh, float track_ciou_norm, int deque_size, int dets_for_track, int dets_for_show); |
| | | LIB_API int fill_remaining_id(detection *new_dets, int new_dets_num, int new_track_id, float thresh); |
| | | |
| | | |
| | | // gemm.h
|
| | | LIB_API void init_cpu();
|
| | |
|