aleju / imgaug-doc Goto Github PK
View Code? Open in Web Editor NEWCode and assets to generate the documentation of imgaug
Home Page: http://imgaug.readthedocs.io
License: MIT License
Code and assets to generate the documentation of imgaug
Home Page: http://imgaug.readthedocs.io
License: MIT License
Hi there. I am looking for a way of tracking the augmentations that happen as I augment my batch of images one by one in a for loop.
My augmentation sequence looks like this:
train_aug = Sequential(
[
Resize(tgt_img_size[:2], interpolation="linear"),
Fliplr(0.3),
Sometimes(0.3, Affine(rotate=10)),
]
)
I then apply it as follows:
aug_img = train_aug.augment_image(img)
It would be nice if I were able post-augmentation to determine what level of rotation and whether or not it was flipped.
Printing the augmentor parameters looks something like this:
[DiscreteUniform(Deterministic(int 224), Deterministic(int 224)), Deterministic(linear), 'HW']
[Binomial(Deterministic(float 0.30000000))]
[Binomial(Deterministic(float 0.30000000))]
Unfortunately, the above does not tell me how the input image was affected. Your help in this would be greatly appreciated.
Thanks!
Using first example:
import imageio
import imgaug as ia
%matplotlib inline
image = imageio.imread("https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png")
print("Original:")
ia.imshow(image)
Original:
AttributeError Traceback (most recent call last)
in ()
6
7 print("Original:")
----> 8 ia.imshow(image)
AttributeError: module 'imgaug' has no attribute 'imshow'
Hi,
in case of a sequence with many transformations (or just 2), the first transformation may shift a bb outside the image, and the seconds transformation back inside. In this case the bb on image method "is_fully_within_image" returns "True".
It would be nice to have some methods like "did_go_outside_during_sequence" / "did_go_partially_outside_during_sequence" or something like this to indicate if the bbOnImage made the travel outside and back, because in this case a part of the image inside the bb is lost (black) and this indication is quite relevant.
For a sequence with only a few transformations it is possible to check it, considering only the first transform, then the second and so forth but this is cumbersome. So a single function would be quite nice.
Or is there something similar already existig that I missed ?
Sincerely
XM
I ran these commands:
conda config --add channels conda-forge
conda install imgaug
That I found here: https://imgaug.readthedocs.io/en/latest/source/installation.html#installation-in-anaconda
And this is the error I got:
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
It just hangs up after several attempts.
Hi
I wonder if you guys have any reversible augmentation. I mean when I apply the augmentation I can the reverse of it and get the original input. I know it is trivial for flip/rotation/translation. But I am not sure if you have any other reversable augmentation ? for example in PerspectiveTransform or PiecewiseAffine?
Hi,
There is some confusion regarding the info on the Jpeg compression function
"
compression (number or tuple of number or list of number or imgaug.parameters.StochasticParameter, optional) – Degree of compression used during jpeg compression within value range [0, 100]. Higher values denote stronger compression and will cause low-frequency components to disappear. Standard values used when saving images are at around 75 and will usually not degrade image quality very much.
"
Its true that 75 is usually used, but because of the way the function is implemented (higher number means more supression), this statement is confusing. The corresponding compression value should be 25.
If you open a png file, make a trivial edit, and resave it as jpg, it has the same file size as passing it through the JpegCompression augmentation with 25 parameter, not 75
This is a really awesome repo! I want to ensure some consistency accross experiments. I was wondering if there is a way to export a sequential set of augmentations to a json and back. That way it's human readable! Currently I just pickle.dump, but I woudn't prefer that.
Best,
Agastya
Warning/error message I got using imgaug on my python3 installation. Python 3.8.10 (default, Mar 15 2022, 12:22:08)
[GCC 9.4.0] on linux.
imgaug.py:2120: MatplotlibDeprecationWarning:
The set_window_title function was deprecated in Matplotlib 3.4 and will be removed two minor releases later. Use manager.set_window_title or GUI-specific methods instead.
Does imgaug support the exact same augmentation for images within a batch, e.g. iaa.Sequential([iaa.Fliplr(0.4),....]) What is the best way to do this, with images within a batch flipped or not flipped at the same time and randomized between the batches? Looking forward to your reply, thanks!
Do your library support augmentation of data annotated using coco format. ?
thanks.
Inverse of a sequential of transformation is needed. The use case is important in object detection. For example, we would resize and pad images in object detection, the bounding boxes are transformed along the process in current library. However, when we perform inference, we need to convert the predicted bounding boxes back to that match original image.
Is it possible for the current library do that? If not, I strongly suggest to add this feature.
Hey ho imgaugment Team :),
When I used your component It is not possible to use a dtype other than uint8. Is that correct, and why is that? I see no reason for this restriction since most augmenters like skewing or rotating would work just fine with other dtypes.
Next question how can I augment multi frame images? With a shape: [frames, height, width, channels]. If I use the augmenters like that the frames will be have each it's own augmention applied and therefore the images are not augmented in the same manner.
Greetings and thanks in advance :)
Thank you for this extremely useful library!
I would like to point out that in the list of the attributes of the bbs class the attribute "label" is missing.
I would have corrected it myself, but I am not sure how to contribute.
So everybody who would like to retrieve the label from a bbs can do so with bbs.label
.
LaTeX at notebooks/A02 doesn't work.
$R$
doesn't exchange into correct format.
Please modify, thank you for your works !
Hi, when I augment a array with shape (H, W), it is ok sometimes, but failed with the above error sometimes, too. could someone tell me how to avoid it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.