Skip to content

Latest commit

 

History

History
85 lines (69 loc) · 2.76 KB

File metadata and controls

85 lines (69 loc) · 2.76 KB

createsamples arguments

info

  • -info <collection_file_name>
  • Used to supply all the positives to be cut out, resized and put in the opencv needed binary format. Unlike img it provides more robust model.
  • A description file describing the image and size of the object.
  • Format:
[filename] [# of objects] [[x y width height] [... 2nd object] ...]
[filename] [# of objects] [[x y width height] [... 2nd object] ...]
[filename] [# of objects] [[x y width height] [... 2nd object] ...]
...
  • (x,y) is the left-upper corner of the object where the origin (0,0) is the left-upper corner of the image

vec

  • -vec <vec_file_name>
  • Output file containing positive samples for training.

img

  • -img <image_file_name>
  • Picture of source object.
  • Used to generate a bunch of positives from a single positive object image unlike info.
  • Positive samples are generated by randomly rotating the object, changing the image intensity as well as placing the image on arbitrary backgrounds.

bg

  • -bg <background_file_name>
  • The description file of the background image. Contains a series of image file names. These images will be randomly selected as the background of the crop body.
  • These images are not containing objects you want to detect.
  • Format:
[filename]
[filename]
[filename]
...

num

  • -num <number_of_samples>
  • The number of positive samples generated.

bgcolor

  • -bgcolor <background_color>
  • Background color (currently grayscale)
  • Represents transparent color. Because image compression can cause color deviation, the color tolerance can be specified by -bgthresh . All pixels between bgcolor-bgthresh and bgcolor+bgthresh are set as transparent pixels.

bgthresh

  • -bgthresh <background_color_threshold>
  • Used with bgcolor.

inv

  • -inv
  • If this flag is specified, the color of the foreground image will be inverted.

randinv

  • -randinv
  • If this flag is specified, the colors will be randomly inverted.

maxidev

  • -maxidev <max_intensity_deviation>
  • The maximum value of the intensity gradient of pixels in the foreground sample.

maxxangle

  • -maxxangle <max_x_rotation_angle>
  • The maximum rotation angle of the X axis, which must be in radians.

maxyangle

  • -maxyangle <max_y_rotation_angle>
  • The maximum rotation angle of the Y axis, which must be in radians.

maxzangle

  • -maxzangle <max_z_rotation_angle>
  • The maximum rotation angle of the Z axis, which must be in radians.

show

  • -show
  • If this option is specified, each sample will be displayed. If you press the Esc key, the program will continue to create the sample but no longer display it.

w

  • -w <sample_width>
  • The width of the output sample (in pixels).

h

  • -h <sample_height>
  • The height (in pixels) of the output sample.