Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Online augmentation tests #47

Open
1 of 4 tasks
gngdb opened this issue Mar 4, 2015 · 4 comments
Open
1 of 4 tasks

Online augmentation tests #47

gngdb opened this issue Mar 4, 2015 · 4 comments
Assignees

Comments

@gngdb
Copy link
Member

gngdb commented Mar 4, 2015

We're running a number of models using online augmentation as the code to do it is now (just) working. Most importantly, we want to be able to replicate the results of the simple 8 augmentations with normalisation we've already submitted to the leaderboard. The full list is:

  • 8aug repeat with three different initial learning rates
  • many more augmentations (based on spec from Scott, more info to follow)
  • 96 by 96 with rotation and flip augmentations, as with the 8aug
  • 128 by 128 as above
@gngdb gngdb added this to the Pylearn2 models milestone Mar 4, 2015
@gngdb gngdb self-assigned this Mar 4, 2015
@gngdb
Copy link
Member Author

gngdb commented Mar 5, 2015

All seem to have diverged/failed. As the results are so far from what we saw without online augmentation suspect some large bug in the ListDataset.

@gngdb
Copy link
Member Author

gngdb commented Mar 8, 2015

First of these is now done. Somehow got better score than before; could not think of good explanation why.

@scottclowe
Copy link
Member

The online augmentations are as follows:

  • flip: Reflects the image in the x-direction
    • 0 or undefined: never flips
    • 1: Flips with probability 50%
  • rotate: Rotates the image
    • 0 or undefined: no rotate augmentations
    • [list,of,angles,in,degrees]: pick an angle at random from the list and rotate by that
    • N, where N is integer>1: pick a random augmentation from k/N * 360 for k=0,...,N
    • -1: pick a float from [0,360) with uniform distribution
  • shear: Shears (skews) the image
    • 0 or undefined: no shearing
    • [list,of,angles,in,degrees]: pick an angle at random from the list and shear the image by that much
    • S, where S is a float (should be order of 1): pick a shear angle from a Gaussian distribution centred around 0 with standard deviation S
  • scale: Scales the image
    • 0 or undefined: no scaling
    • [list,of,proportional,scale,factors]: pick a scale factor at random from the list and scale the image by that scale factor (1 is no change, 0.9 etc is bigger, 1.1 etc is smaller [yes the opposite to expected])
    • S, where S is a float (should be order of 0.1): pick a scale factor from a Gaussian distribution centred around 1.0 with standard deviation S
  • scale_asym: Stretches the image by scaling x and y differently. x and y scales use the scale factor from scale, plus a bonus scale each
    • 0 or undefined: no asymmetric scaling
    • S, where S is a float (should be order of 0.01): for both x and y, pick a scale factor from a Gaussian distribution centred around 0 with standard deviation S. Then each is scaled by globalscalefactor+dimensionalasymscalefactor
  • shunt: Translates the image in the x-y plane
    • 0 or undefined: no translations
    • [list,of,proportional,translations]: for x and y, pick a translation at random from the list and shift the image by these amounts for x and y respectively
    • S, where S is a float (should be order of 0.1): for both x and y, pick a translation from a Gaussian distribution centred around 0 with standard deviation S. Then each is shifted by this proportion of the image width or height respectively.

Also

  • transform_order: Defines the polynomial order of the image warp.
    • 0.5 or undefined: default. Slower, but gives better results than 0 or 1.
    • 0: nearest neighbour
    • 1: bilinear interpolation
    • 2,3,...: spline, cubic, etc
    • X for 0<X<1: weighted average of nearest neighbour and bilinear.

@scottclowe
Copy link
Member

I am currently using these augmentations:

                flip: 1,
                rotate: -1,
                shear: 6,
                scale: 0.08,
                scale_asym: 0.008,
                shunt: 0.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants