mirror of
https://github.com/pjreddie/darknet.git
synced 2023-08-10 21:13:14 +03:00
per image randomness in crop layer
This commit is contained in:
@ -187,6 +187,8 @@ crop_layer *parse_crop(list *options, size_params params)
|
||||
int crop_width = option_find_int(options, "crop_width",1);
|
||||
int flip = option_find_int(options, "flip",0);
|
||||
float angle = option_find_float(options, "angle",0);
|
||||
float saturation = option_find_float(options, "saturation",1);
|
||||
float exposure = option_find_float(options, "exposure",1);
|
||||
|
||||
int batch,h,w,c;
|
||||
h = params.h;
|
||||
@ -195,7 +197,7 @@ crop_layer *parse_crop(list *options, size_params params)
|
||||
batch=params.batch;
|
||||
if(!(h && w && c)) error("Layer before crop layer must output image.");
|
||||
|
||||
crop_layer *layer = make_crop_layer(batch,h,w,c,crop_height,crop_width,flip, angle);
|
||||
crop_layer *layer = make_crop_layer(batch,h,w,c,crop_height,crop_width,flip, angle, saturation, exposure);
|
||||
option_unused(options);
|
||||
return layer;
|
||||
}
|
||||
|
Reference in New Issue
Block a user