Commit 02f41b25 authored by Yuxin Wu's avatar Yuxin Wu

correct augmentors in resnet

parent c2a38de9
......@@ -8,9 +8,9 @@ Models can be [downloaded here](https://goo.gl/6XjK9V).
| Model | Top 5 Error | Top 1 Error |
|:-------------------|-------------|------------:|
| ResNet18 | 10.55% | 29.73% |
| ResNet18 | 10.47% | 29.56% |
| ResNet34 | 8.51% | 26.50% |
| ResNet50 | 7.24% | 23.91% |
| ResNet50 | 7.16% | 23.72% |
| ResNet50-SE | TRAINING | TRAINING |
| ResNet101 | 6.26% | 22.53% |
......
......@@ -51,25 +51,25 @@ class GoogleNetResize(imgaug.ImageAugmentor):
def fbresnet_augmentor(isTrain):
"""
Augmentor used in fb.resnet.torch, for BGR images.
Augmentor used in fb.resnet.torch, for BGR images in range [0,255].
"""
if isTrain:
augmentors = [
GoogleNetResize(),
imgaug.RandomOrderAug(
[imgaug.Brightness(30, clip=False),
imgaug.Contrast((0.8, 1.2), clip=False),
[imgaug.BrightnessScale((0.6, 1.4), clip=False),
imgaug.Contrast((0.6, 1.4), clip=False),
imgaug.Saturation(0.4, rgb=False),
# rgb-bgr conversion
imgaug.Lighting(0.1,
eigval=[0.2175, 0.0188, 0.0045][::-1],
eigval=np.asarray(
[0.2175, 0.0188, 0.0045][::-1]) * 255.0,
eigvec=np.array(
[[-0.5675, 0.7192, 0.4009],
[-0.5808, -0.0045, -0.8140],
[-0.5836, -0.6948, 0.4203]],
dtype='float32')[::-1, ::-1]
)]),
imgaug.Clip(),
imgaug.Flip(horiz=True),
]
else:
......
......@@ -68,7 +68,7 @@ class InputSource(object):
Initialize/reinitialize this InputSource.
For training, it will get called by the trainer in `before_train` callbacks.
For inference, the :class:`InferenceRunner` will call it each time it does is triggered.
For inference, the :class:`InferenceRunner` will call this method each time it is triggered.
"""
self._reset_state()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment