small_object can be used in [net] in cfg-file for objects 1x1 pix on FullHD image
| | |
| | | box_label *boxes = read_boxes(labelpath, &count); |
| | | if (small_object == 1) { |
| | | for (i = 0; i < count; ++i) { |
| | | if (boxes[i].w < 0.01) boxes[i].w = 0.01; |
| | | if (boxes[i].h < 0.01) boxes[i].h = 0.01; |
| | | if (boxes[i].w < 0.001F) boxes[i].w = 0.001F; |
| | | if (boxes[i].h < 0.001F) boxes[i].h = 0.001F; |
| | | } |
| | | } |
| | | randomize_boxes(boxes, count); |
| | |
| | | id = boxes[i].id; |
| | | |
| | | // not detect small objects |
| | | if ((w < 0.001 || h < 0.001)) continue; |
| | | if ((w < 0.001F || h < 0.001F)) continue; |
| | | |
| | | truth[i*5+0] = x; |
| | | truth[i*5+1] = y; |
| | |
| | | args.classes = classes; |
| | | args.jitter = jitter; |
| | | args.num_boxes = l.max_boxes; |
| | | args.small_object = l.small_object; |
| | | args.small_object = net.small_object; |
| | | args.d = &buffer; |
| | | args.type = DETECTION_DATA; |
| | | args.threads = 64; // 8 |
| | |
| | | int out_h, out_w, out_c; |
| | | int n; |
| | | int max_boxes; |
| | | int small_object; |
| | | int groups; |
| | | int size; |
| | | int side; |
| | |
| | | float exposure; |
| | | float saturation; |
| | | float hue; |
| | | int small_object; |
| | | |
| | | int gpu_index; |
| | | tree *hierarchy; |
| | |
| | | l.log = option_find_int_quiet(options, "log", 0); |
| | | l.sqrt = option_find_int_quiet(options, "sqrt", 0); |
| | | |
| | | l.small_object = option_find_int_quiet(options, "small_object", 0); |
| | | l.softmax = option_find_int(options, "softmax", 0); |
| | | l.focal_loss = option_find_int_quiet(options, "focal_loss", 0); |
| | | //l.max_boxes = option_find_int_quiet(options, "max",30); |
| | |
| | | net->max_crop = option_find_int_quiet(options, "max_crop",net->w*2); |
| | | net->min_crop = option_find_int_quiet(options, "min_crop",net->w); |
| | | |
| | | net->small_object = option_find_int_quiet(options, "small_object", 0); |
| | | net->angle = option_find_float_quiet(options, "angle", 0); |
| | | net->aspect = option_find_float_quiet(options, "aspect", 1); |
| | | net->saturation = option_find_float_quiet(options, "saturation", 1); |