Added letter_box=1 param in [net] section (cfg-file) for keeping aspect ratio during training

This commit is contained in:
AlexeyAB
2019-06-22 17:04:00 +03:00
parent 1ed71f4b29
commit c9129c2078
8 changed files with 83 additions and 23 deletions

View File

@ -600,6 +600,7 @@ typedef struct network {
int flip; // horizontal flip 50% probability augmentaiont for classifier training (default = 1)
int blur;
int mixup;
int letter_box;
float angle;
float aspect;
float exposure;
@ -760,6 +761,7 @@ typedef struct load_args {
int mini_batch;
int track;
int augment_speed;
int letter_box;
int show_imgs;
float jitter;
int flip;
@ -827,7 +829,7 @@ LIB_API layer* get_network_layer(network* net, int i);
LIB_API detection *make_network_boxes(network *net, float thresh, int *num);
LIB_API void reset_rnn(network *net);
LIB_API float *network_predict_image(network *net, image im);
LIB_API float validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float thresh_calc_avg_iou, const float iou_thresh, const int map_points, network *existing_net);
LIB_API float validate_detector_map(char *datacfg, char *cfgfile, char *weightfile, float thresh_calc_avg_iou, const float iou_thresh, const int map_points, int letter_box, network *existing_net);
LIB_API void train_detector(char *datacfg, char *cfgfile, char *weightfile, int *gpus, int ngpus, int clear, int dont_show, int calc_map, int mjpeg_port, int show_imgs);
LIB_API void test_detector(char *datacfg, char *cfgfile, char *weightfile, char *filename, float thresh,
float hier_thresh, int dont_show, int ext_output, int save_labels, char *outfile, int letter_box);