You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
I am new to mxnet (to deep learning in general), and in my project I am in a situation where I need to do some scaling on the images for augmentation.
I was using the provided ImageAugmenter class for this - setting the min_random_scale and max_random_scale parameters when initialising the ImageRecordIter. However, after some digging into the source code I found what the augmenter actually does is to scale the image then crop it to fit the predefined data_shape. What I want is to randomly scale the image while retaining its content, which means an image is first scaled, then resized again to the predefined data_shape.
I managed to change the original ImageAugmenter class so it now does what I wanted, but I am not sure if it is the best place to put the changes in (potential merge conflicts if something new is added to the augmenter in the future). I can think of implementing my own augmenter but it looks like I will need to implement a new ImageRecordIter and a ImageIOParser as well, I am not sure if the effort is worth it if all I want is just to add a new augmentation approach.
Can someone point me to a right direction? Any help is much appreciated. :)
Cheers,
Vincent
The text was updated successfully, but these errors were encountered:
So now you can build your augmenter class in a new file, register it as aug_default.cc and switch to your augmenter by setting aug_seq in ImageRecordIter
Hi, @vincentfung13 @shipeng-uestc @tqchen
This seems a bit confusing, is there a simple example of using aug_seq? I want to use like"random crop - > resize", this resize method stretches the image to a square.
I've just replied to a similar post here which hopefully clarifies things a little more.
Aside from implementing your own augmenter and using in aug_seq, you should take a look at Gluon's Transforms. You can Compose augmentations in the order you need.
Hi all,
I am new to mxnet (to deep learning in general), and in my project I am in a situation where I need to do some scaling on the images for augmentation.
I was using the provided ImageAugmenter class for this - setting the min_random_scale and max_random_scale parameters when initialising the ImageRecordIter. However, after some digging into the source code I found what the augmenter actually does is to scale the image then crop it to fit the predefined data_shape. What I want is to randomly scale the image while retaining its content, which means an image is first scaled, then resized again to the predefined data_shape.
I managed to change the original ImageAugmenter class so it now does what I wanted, but I am not sure if it is the best place to put the changes in (potential merge conflicts if something new is added to the augmenter in the future). I can think of implementing my own augmenter but it looks like I will need to implement a new ImageRecordIter and a ImageIOParser as well, I am not sure if the effort is worth it if all I want is just to add a new augmentation approach.
Can someone point me to a right direction? Any help is much appreciated. :)
Cheers,
Vincent
The text was updated successfully, but these errors were encountered: