Commit 0663f7b9 authored by Yuxin Wu's avatar Yuxin Wu

update augmentor

parent 4733ce1c
...@@ -18,7 +18,7 @@ Also see an implementation of [DenseNet](https://github.com/YixuanLi/densenet-te ...@@ -18,7 +18,7 @@ Also see an implementation of [DenseNet](https://github.com/YixuanLi/densenet-te
## load-resnet.py ## load-resnet.py
A script to convert and run ResNet{50,101,152} ImageNet models released by Kaiming. A script to convert and run ResNet{50,101,152} ImageNet caffe models [released by Kaiming](https://github.com/KaimingHe/deep-residual-networks).
Example usage: Example usage:
```bash ```bash
......
...@@ -46,7 +46,10 @@ class AugmentImageComponent(MapDataComponent): ...@@ -46,7 +46,10 @@ class AugmentImageComponent(MapDataComponent):
:param augmentors: a list of `ImageAugmentor` instance to be applied in order. :param augmentors: a list of `ImageAugmentor` instance to be applied in order.
:param index: the index (or list of indices) of the image component in the produced datapoints by `ds`. default to be 0 :param index: the index (or list of indices) of the image component in the produced datapoints by `ds`. default to be 0
""" """
self.augs = AugmentorList(augmentors) if isinstance(augmentors, AugmentorList):
self.augs = augmentors
else:
self.augs = AugmentorList(augmentors)
super(AugmentImageComponent, self).__init__( super(AugmentImageComponent, self).__init__(
ds, lambda x: self.augs.augment(x), index) ds, lambda x: self.augs.augment(x), index)
......
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