facebookresearch / augly Goto Github PK
View Code? Open in Web Editor NEWA data augmentations library for audio, image, text, and video.
License: Other
A data augmentations library for audio, image, text, and video.
License: Other
Using the color_jitter function for images, if user does not specify a different value than 1.0 to factor parameters, the intensity function will return 0.0, while might return a weighted intensity of the actions did.
The mult_factor_intensity_helper function specifies that if a factor value is 1 the intensity should be 0.0, maybe could be changed to another helper function to create the weighted intensity.
Steps to reproduce the behavior:
The intensity value returned in the metadata might be a weighted intensity.
pip install augly
, clone & pip install -e AugLy
): cloneaug_image = imaugs.color_jitter(image_path, brightness_factor=0.5, contrast_factor=1.3, saturation_factor=1.0, output_path=output_path, metadata=meta_color_jitter)
and metadata contains the following info:
'name': 'color_jitter'
'src_width': '640'
'src_height': '426'
'dst_width': '640'
'dst_height': '426'
'output_path': '/content/images/output.png'
'brightness_factor': '0.5'
'contrast_factor': '1.3'
'saturation_factor': '1.0'
'intensity': '0.0'
Steps to reproduce the behavior:
conda create -n augly_test python=3.6.2
conda activate augly_test
pip install augly
python -c "import augly.image"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/__init__.py", line 4, in <module>
from augly.image.composition import Compose, OneOf
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/composition.py", line 7, in <module>
from augly.image.transforms import BaseTransform
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/transforms.py", line 8, in <module>
import augly.image.functional as F
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/functional.py", line 11, in <module>
import augly.image.utils as imutils
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/utils/__init__.py", line 4, in <module>
from augly.image.utils.metadata import get_func_kwargs, get_metadata
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/utils/metadata.py", line 7, in <module>
import augly.image.intensity as imintensity
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/intensity.py", line 6, in <module>
import augly.image.utils as imutils
AttributeError: module 'augly' has no attribute 'image'
conda install -c conda-forge python-magic
$ξ° python -c "import augly.image"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/__init__.py", line 4, in <module>
from augly.image.composition import Compose, OneOf
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/composition.py", line 7, in <module>
from augly.image.transforms import BaseTransform
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/transforms.py", line 8, in <module>
import augly.image.functional as F
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/functional.py", line 11, in <module>
import augly.image.utils as imutils
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/utils/__init__.py", line 4, in <module>
from augly.image.utils.metadata import get_func_kwargs, get_metadata
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/utils/metadata.py", line 7, in <module>
import augly.image.intensity as imintensity
File "/Users/iseessel/anaconda3/envs/augly_test/lib/python3.6/site-packages/augly/image/intensity.py", line 6, in <module>
import augly.image.utils as imutils
AttributeError: module 'augly' has no attribute 'image'
List of packages:
$ξ° conda list
# packages in environment at /Users/iseessel/anaconda3/envs/augly_test:
#
# Name Version Build Channel
augly 0.1.9 pypi_0 pypi
ca-certificates 2021.5.30 h033912b_0 conda-forge
certifi 2021.5.30 py36h79c6626_0 conda-forge
dataclasses 0.8 pypi_0 pypi
iopath 0.1.9 pypi_0 pypi
libcxx 12.0.0 h2f01273_0
libedit 3.1.20210714 h9ed2024_0
libffi 3.2.1 h0a44026_1007
libmagic 5.39 haaf19a9_0 conda-forge
ncurses 6.2 h0a44026_1
nlpaug 1.1.3 pypi_0 pypi
numpy 1.19.5 pypi_0 pypi
openssl 1.0.2u h0b31af3_0 conda-forge
pillow 8.3.2 pypi_0 pypi
pip 21.2.2 py36hecd8cb5_0
portalocker 2.3.2 pypi_0 pypi
python 3.6.2 hd04bb42_19
python-magic 0.4.24 py36h79c6626_0 conda-forge
python_abi 3.6 2_cp36m conda-forge
readline 7.0 h1de35cc_5
regex 2021.9.30 pypi_0 pypi
setuptools 58.0.4 py36hecd8cb5_0
sqlite 3.33.0 hffcf06c_0
tk 8.6.11 h7bc2e8c_0
tqdm 4.62.3 pypi_0 pypi
wheel 0.37.0 pyhd3eb1b0_1
xz 5.2.5 h1de35cc_0
zlib 1.2.11 h1de35cc_3
Import Fails. Note: I've tried the same on python3.8.
pip install augly
, clone & pip install -e AugLy
): See above.Bounding boxes augmentation for images
While AugLy makes it very easy to do data augmentation, it's still complicated to do bounding box augmentation that matches the image augmentation.
Being able to do data augmentation is a very nice feature to improve ML models. However, it's also necessary to be able to obtain an "augmented bounding box" that's aligned with the augmentation done on the image.
Build your own bounding box augmentation following this tutorial, but too cumbersome.
Search another library that does this automatically.
I want transfer telegram members one CHANAl to an other chanel
Steps to reproduce the behavior:
image_path = "data\query\Q00000.jpg"
image = tf.keras.preprocessing.image.load_img(image_path)
image = tf.keras.preprocessing.image.img_to_array(image)
image = tf.keras.preprocessing.image.smart_resize(image, (224,224), interpolation='nearest')
image = tf.keras.preprocessing.image.array_to_img(image)
imaugs.meme_format(image, caption_height=np.random.randint(50),
meme_bg_color=tuple(np.random.randint(255, size=3)),
text_color=tuple(np.random.randint(255, size=3)),
text=meme_text[np.random.randint(len(meme_text))])
Based on the caption height, the function sometimes throws:
imaugs.meme_format(image, caption_height=np.random.randint(50),...
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
c:\Users\name\Documents\Facebook_Challenge\custom.py in
----> 16 imaugs.meme_format(image, caption_height=np.random.randint(50),
17 meme_bg_color=tuple(np.random.randint(255, size=3)),
18 text_color=tuple(np.random.randint(255, size=3)),
19 text=meme_text[np.random.randint(len(meme_text))])
20
~\AppData\Roaming\Python\Python38\site-packages\augly\image\functional.py in meme_format(image, output_path, text, font_file, opacity, text_color, caption_height, meme_bg_color, metadata)
657 while True:
658 font = ImageFont.truetype(local_font_path, font_size)
--> 659 text_width, text_height = font.getsize_multiline(text)
660
661 if text_width <= (width - 10) and text_height <= (caption_height - 10):
~\AppData\Roaming\Python\Python38\site-packages\PIL\ImageFont.py in getsize_multiline(self, text, direction, spacing, features, language, stroke_width)
485 max_width = 0
486 lines = self._multiline_split(text)
--> 487 line_spacing = self.getsize("A", stroke_width=stroke_width)[1] + spacing
488 for line in lines:
489 line_width, line_height = self.getsize(
~\AppData\Roaming\Python\Python38\site-packages\PIL\ImageFont.py in getsize(self, text, direction, features, language, stroke_width)
428 # vertical offset is added for historical reasons
429 # see https://github.com/python-pillow/Pillow/pull/4910#discussion_r486682929
--> 430 size, offset = self.font.getsize(text, "L", direction, features, language)
431 return (
432 size[0] + stroke_width * 2,
OSError: invalid argument
return the PIL.Image.Image
pip install augly
, clone & pip install -e AugLy
): pipWhen caption height is below 10 augly throws the error
Possibly show a warning instead.
I suppose AugLy is a full featured augmentation lib? So that some technics such as MixUp, CutMix will also support and use in detectron2?
Hello everybody, I want to add a new function in audio augmentations
to resample the audio.
This is a great function and I found most of the guys are not able to resample audio through so by this Augly
which is specially for augmentations so we can provide this function to users for our best case.
Resampling audio means increase or decrease the sample rate of audio. For example audio has sample rate from 22050
to 44100
.
Add an augmentation called augment_audio
which takes in a video and an audio augmentation (a Callable
), applies the given audio augmentation to the video's audio track, recombines the video with the augmented audio, and writes out the video to the given output path. The metadata should include a field audio_metadata
which contains the metadata resulting from applying the audio augmentation on the video's audio track, which means you should call get_metadata()
twice -- once for the video, and once for the audio augmentation.
One of the cool things about AugLy is that it's multimodal, so users can transform data of different modalities under one unified API, and even apply augmentations to multimodal data (e.g. augment text which is then overlayed over an image which is also augmented, or augment the audio track of a video which is also augmented). In order to make it easier to combine audio & video augmentations, we would like to define a video augmentation which augments the audio with a given AugLy augmentation.
Hello, there seems to be a type issue in the text transformations functions in the augly/text/functional.py
file. Indeed, these functions can take a string or a list of strings as inputs, and return a new string or list of strings based on the input type.
textaugs.simulate_typos(["hello"]) # returns a list of strings
textaugs.simulate_typos("hello") # returns a string
However, all the functions are defined as :
def change_case(
texts: Union[str, List[str]],
...
) -> List[str]:
pass
Is it possible to change the types of the functions as something like this to solve this issue :
from typing import TypeVar
T = TypeVar("T", str, List[str])
def change_case(
texts: T,
...
) -> T:
pass
Add SpecAugment as a form of audio augmentation.
SpecAugment (https://arxiv.org/abs/1904.08779) has resulted in huge improvements in speech recognition performance over the last few years.
Any serious audio augmentation toolkit should include SpecAugment as a type of audio augmentation. It has become extremely popular in speech recognition to the point where one wonders about the quality of a research paper that does not use this as standard processing. This, combined with speed and frequency perturbation, has become de rigeur in the speech recognition field. It should be an additional form of processing and accompanied by best practices in applying the technique as there are many variations.
People use time and frequency perturbations by themselves, but when you have a lot of training data, this methodology tends to wash out. SpecAugment improves results even with a lot of training data (at the expense of bigger models).
You might also wish to include suggestions for how to integrate AugLy into popular speech recognition toolkits like Kaldi.
Traceback (most recent call last):
File "video_aug.py", line 3, in
import augly.video as vidaugs
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/video/init.py", line 4, in
from augly.video.composition import Compose, OneOf
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/video/composition.py", line 8, in
from augly.video.helpers import validate_input_and_output_paths
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/video/helpers/init.py", line 4, in
from augly.video.helpers.ffmpeg import (
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/video/helpers/ffmpeg.py", line 10, in
import augly.audio.utils as audutils
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/audio/init.py", line 4, in
from augly.audio.composition import Compose, OneOf
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/audio/composition.py", line 8, in
from augly.audio.transforms import BaseTransform
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/audio/transforms.py", line 7, in
import augly.audio.functional as F
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/audio/functional.py", line 8, in
import augly.audio.utils as audutils
File "/root/anaconda3/envs/zyj/lib/python3.6/site-packages/augly/audio/utils.py", line 7, in
import augly.audio.intensity as audintensity
AttributeError: module 'augly' has no attribute 'audio'
Steps to reproduce the behavior:
1.install augly
2.run sample code import augly.video as vidaugs
3. error occured.
Implement a new augmentation called loop
which takes in an audio file/numpy array and returns it looped a given n
number of times.
loop
augmentation here.python -m unittest discover -s augly/tests/audio_tests/ -p "*"
when running the colab notebook located in text augmentation folder, after installation and restarting notebook, the following error after calling library import:
NameError Traceback (most recent call last)
<ipython-input-1-3436c02f8201> in <module>()
----> 1 import augly.text as textaugs
2
3 # Define input text
4 input_text = "Hello, world! How are you today?"
5 input_text
8 frames
/usr/local/lib/python3.7/dist-packages/nlpaug/model/lang_models/machine_translation_transformers.py in MtTransformers()
44
45 def translate_one_step_batched(
---> 46 self, data, tokenizer: PreTrainedTokenizerBase, model: MarianMTModel
47 ):
48 tokenized_texts = tokenizer(data, padding=True, return_tensors='pt')
NameError: name 'PreTrainedTokenizerBase' is not defined
Steps to reproduce the behavior:
augly
importing library without error
Ensure that images are returned from all augmentations in the same mode in which they were passed in
src_mode
arg to ret_and_save_image()
in image/utils/utils.py
src_mode
arg into ret_and_save_image()
from every augmentation except convert_color
in image/functional.py
(e.g. here for apply_lambda
)evaluate_class()
, assert that the mode of self.img
& dst
are equal.python -m unittest discover -s augly/tests/image_tests/ -p "*"
The init file for text augs mentions an InsertEmoji transform (see here) but that transform is nowhere to be seen in the repo (at least that I could find...)
Steps to reproduce the behavior:
Either fix that line, or better yet if there is an InsertEmoji transform I think folks may find it useful!
Steps to reproduce the behavior:
scipy --version from 1.6.2 to 1.5.4
pip install augly
, clone & pip install -e AugLy
): pip install wheel-name
CI tests are failing due to
> Run brew install watchman
Error: watchman: no bottle available!
You can try to install from source with:
brew install --build-from-source watchman
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.
Error: Process completed with exit code 1.
Support Python 3.6
Python 3.6 is a widely used Python version. Could you add support to it? Or is there any problem to support Python 3.6?
Hi! I'm testing your library (concretely the text part) with spanish language following this examplea . In this process the library throws me an error when it tries to open the fonts file because an encoding problem (It can't understand some characters).
I've changed this line by: with open(local_fonts_path, encoding='utf-8') as text_file:
and it works.
Steps to reproduce the behavior:
OverlayText
with a combination of specific text [166, 287] and specific font (NotoSansBengaliUI-Regular.ttf") results in error.# imports
import os
import augly.image as imaugs
import augly.utils as utils
from IPython.display import display
# import paths
from augly.utils.base_paths import (
EMOJI_DIR,
FONTS_DIR,
SCREENSHOT_TEMPLATES_DIR,
)
# read sample input_img
input_img_path = os.path.join(
utils.TEST_URI, "image", "inputs", "dfdc_1.jpg"
)
input_img = imaugs.scale(input_img_path, factor=0.2)
# This results in error
overlay_text = imaugs.OverlayText(
text = [166, 287],
font_file = os.path.join(FONTS_DIR, "NotoSansBengaliUI-Regular.ttf"),
)
overlay_text(input_image)
# These do not result in error
overlay_text = imaugs.OverlayText(
text = [166],
font_file = os.path.join(FONTS_DIR, "NotoSansBengaliUI-Regular.ttf"),
)
overlay_text(input_image)
# These do not result in error
overlay_text = imaugs.OverlayText(
text = [287],
font_file = os.path.join(FONTS_DIR, "NotoSansBengaliUI-Regular.ttf"),
)
overlay_text(input_image)
# These do not result in error
overlay_text = imaugs.OverlayText(
text = [166, 287]
# font_file not specified
)
overlay_text(input_image)
Stack trace:
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-74-a3f6c232cffd> in <module>
3 font_file = os.path.join(FONTS_DIR, "NotoSansBengaliUI-Regular.ttf"),
4 )
----> 5 overlay_text(input_image)
~/miniconda3/envs/mds572/lib/python3.7/site-packages/augly/image/transforms.py in __call__(self, image, force, metadata)
48 return image
49
---> 50 return self.apply_transform(image, metadata)
51
52 def apply_transform(
~/miniconda3/envs/mds572/lib/python3.7/site-packages/augly/image/transforms.py in apply_transform(self, image, metadata)
920 x_pos=self.x_pos,
921 y_pos=self.y_pos,
--> 922 metadata=metadata,
923 )
924
~/miniconda3/envs/mds572/lib/python3.7/site-packages/augly/image/functional.py in overlay_text(image, output_path, text, font_file, font_size, opacity, color, x_pos, y_pos, metadata)
1121 text=text_str,
1122 fill=(color[0], color[1], color[2], round(opacity * 255)),
-> 1123 font=font,
1124 )
1125
~/miniconda3/envs/mds572/lib/python3.7/site-packages/PIL/ImageDraw.py in text(self, xy, text, fill, font, anchor, spacing, align, direction, features, language, stroke_width, stroke_fill, embedded_color, *args, **kwargs)
461 else:
462 # Only draw normal text
--> 463 draw_text(ink)
464
465 def multiline_text(
~/miniconda3/envs/mds572/lib/python3.7/site-packages/PIL/ImageDraw.py in draw_text(ink, stroke_width, stroke_offset)
416 ink=ink,
417 *args,
--> 418 **kwargs,
419 )
420 coord = coord[0] + offset[0], coord[1] + offset[1]
~/miniconda3/envs/mds572/lib/python3.7/site-packages/PIL/ImageFont.py in getmask2(self, text, mode, fill, direction, features, language, stroke_width, anchor, ink, *args, **kwargs)
668 """
669 size, offset = self.font.getsize(
--> 670 text, mode, direction, features, language, anchor
671 )
672 size = size[0] + stroke_width * 2, size[1] + stroke_width * 2
OSError: unknown freetype error
I don't know why this combination of text and font does not work. I would expect there to be no error, since overlaying the same text using another font file does not result in error.
pip install augly
, clone & pip install -e AugLy
): pip install augly
Same error message can be reproduced using the following combinations as well:
text [449, 262]
with font file NotoSansThaana-Regular.ttf
text [295, 481]
with font file NotoSansBengali-Regular.ttf
Hi, from the readme file, there is a example as follows:
aug_image = imaugs.apply_ig_filter(image_path, filter_name="clarendon")
but I can't find apply_ig_filter in the source code, could you help me to solve this,thanks
Since this doesn't seem to be relevant to our library, I'm gonna close this issue. Feel free to reopen and update the description if you need help with AugLy
Originally posted by @zpapakipos in #35 (comment)
I tried to use the audio augmentations in a tensorflow project but I had a "Segmentation fault" error in running time while importing the modules.
In my case it can be reproduced only running these two lines:
import tensorflow
import augly.audio as audaugs
Versions:
tensorflow-gpu==2.4.1
augly==0.1.1
Python 3.8.5
Thank you
howpublishedβΒ =Β β{β\url{https://github.com/
2fa
I see ReplaceSynonyms
in text/__init__.py
, but I don't see that is implemented yet. Are we expecting this functionality any soon?
FYI the audio & video notebooks are temporarily broken, giving the following error. I'm going to add a fix to these notebooks today. This is a known issue between colab & torchaudio right now, which it looks like the colab team is working on: googlecolab/colabtools#2417.
Steps to reproduce the behavior:
Usually importing the audio/video augly modules works with no error.
Allow creating typos from multiple words.
Dummy example : "Hello how are you" => "Hello how ru"
(are you
, two words is being replaced with ru
one word)
I have a custom homemade logic for it and I wanted to use augly to do the same. However, in French, you can have slang coming from two words like Je suis => Chui
(kind of I am => Im
)
Being able to give a misspelling.json
with keys or values containing multiple words.
Mine is already in the good format but the logic is not handled.
Still use my logic on the side but I think it can be useful for many other peoples and use cases.
Thanks for the typo adding and splitting words it's really useful !
I am facing a bit of a bizzare problem: I have a bunch of different sized images and I am trying to train+infer on these, and I have the following example transform code:
self.infer_transform = transforms.Compose([
imaugs.PadSquare(p=1),
transforms.Resize([384], interpolation=torchvision.transforms.InterpolationMode.BICUBIC),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])
When I use a batchsize >1 I get thrown this:
RuntimeError: stack expects each tensor to be equal size, but got [3, 384, 384] at entry 0 and [3, 385, 384] at entry 3
I find this really bizarre, since, after PadSquare, when I resize using a single int, it should give me a square image back - but it seems like it does not... why is this? is this a bug? It almost seems like some round-off error (got [3, 384, 384] at entry 0 and [3, 385, 384]).
Hoever, if I do this:
self.infer_transform = transforms.Compose([
imaugs.PadSquare(p=1),
transforms.Resize((384,384), interpolation=torchvision.transforms.InterpolationMode.BICUBIC),
transforms.ToTensor(),
transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])])
it works fine...
What is the reason behind this? I am perplexed! When I try out sample images in say colab, they seem to have the same size...
Unfortunately, I am loading some 150k images using imagefolder, so I am not able to inspect the image directly.
We could add support to image augmentations to allow the user to specify a bounding box within the image, inside which the augmentation will only be applied.
Requested (& upvoted by 5 users) in #58.
I git clone the project. and then try to install by command:pip install -r .
Checked the code and it doesn't seem possible to seed the augmenters.
To reproduce the same augmented test sets.
Also to (deterministically) augment small test sets.
Adding the possibility to seed augmenters like My_Augmenter(**my_params, seed=42)
which would make reproducible augmentations. Not always the same for all the batch but always in the same order in a reproducible manner.
Don't use augmentation in the test set.
I'm working with text, and I would like to augment a test set but the idea also apply to images and audio.
Thanks in advance and thanks a lot for this nice library !
Grouping library dependencies in setup.py by modality.
If we are going to apply augmentations on just one modality, we shouldn't install all library dependencies needed to augment other modalities.
Use extras_require in setup.py to specify software dependencies that are required for each modality. For example, installing audio only dependencies with augly[audio]
. Have an [all]
option that installs all dependencies.
OverlayStripes()
modifies the input image
Steps to reproduce the behavior:
OverlayStripes()
transformimport os
import augly.image as imaugs
import augly.utils as utils
from IPython.display import display
input_img_path = os.path.join(
utils.TEST_URI, "image", "inputs", "dfdc_1.jpg"
)
input_img = imaugs.scale(input_img_path, factor=0.2)
display(input_img)
display(imaugs.OverlayStripes()(input_img))
display(input_img)
I believe OverlayStripes()
should create a modified copy of the input image without modifying the input image directly. This behaviour would be consistent with other similar methods such as OverlayOntoScreenshot()
, OverlayEmoji()
, and OverlayText()
.
pip install augly
, clone & pip install -e AugLy
): pip install auglyReplace random word with a phonetically similar one.
Or also replace a random word with the same Part Of Speech or lemma (adjective with adjective or run with ran / running etc...)
I'm training a transformer based model to spell check utterances (like a reversed augly).
Like Hello r u fin tdy => Hello are you fine today
.
I realized that quite often the spelling errors come from phonetically similar words
exemple (not so good exemple but for the sake of the explanation) : "I love jeans"
vs "I love gins"
Also, augmenting by replacing with sane pos or other inflections of the same lemma would help in the same direction (as better destroying the sentences to train a better spellchecking model)
Having this kind of built-in Augmentation would help building better models.
Having a built-in augmenter that create mistakes not only with levensthein like distances but uses phonetics.
I've done mine using epitran for phonetics and spacy for pos but other frameworks exists.
Implement my own augmenter (done).
Use only text based distances which cannot find jean
vs gin
or cute
vs beautiful
or run
vs running
as they are textually too different but often found in chats.
imaugs.ScreenshotOverlay(), imaugs.EmojiOverlay(), imaugs.TextOverlay()
are not available?
Thank you for his great package. It would be nice to add lens distortion to image transforms.
In image augmentation, lens distortion can sometimes be valuable. Spesifically, two separate classes can be added to image.transforms
for pincushion and barrel distortions.
Thank you so much for this package. It has some really great augmentations.
aug_image = imaugs.apply_ig_filter(image_path, filter_name="clarendon")
In your image readme it mentions the above function but i don't see it provided in the source. Do you plan on releasing this part of the code?
Steps to reproduce the behavior:
This is the snippet of code I'm running which is from AugLy_image.ipynb
"""
You can also pass in bounding boxes, which will be transformed along with the
image & included in the metadata (note: you must provide metadata to get
the transformed bboxes
"""
meta = []
display(
imaugs.rotate(
input_img,
degrees=15,
metadata=meta,
bboxes=[(20, 6, 500, 600)],
bbox_format="pascal_voc",
)
)
meta
which gives me the following error message
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/var/folders/tb/pj8zr8qn57q8t6cldym25fgw0000gn/T/ipykernel_92443/4056688084.py in <module>
6 meta = []
7 display(
----> 8 imaugs.rotate(
9 input_img,
10 degrees=15,
TypeError: rotate() got an unexpected keyword argument 'bboxes'
I have to remove arguments bboxes
and bboxes_format
for this to run without any error messages, which finally gives me this
I expected this to work, or run without any error messages.
pip install augly
, clone & pip install -e AugLy
): pip install augly
Steps to reproduce the behavior:
pip install augly
, clone & pip install -e AugLy
):Like "Hello I really like Augly"
=> "Hello I reallylike Augly"
The same as splitWord
, it's nice to train language models, spellcheckers etc....
Having a class/function as split word but to randomly merge words
Implement a custom logic.
Use only split words
I'm trying to train a spell checker with really hard slangs and it's one of my use cases.
Thanks a lot !
Have a great day
Related to #65
There seems to be a lot of dependencies in requirements.txt that are actually not needed. For example scikit-learn, numba, joblib, threadpoolctl, six, etc. are not used and could be removed. There are probably a bunch of others, I didn't check them all.
Also, all dependencies are pinned-down to a specific version, e.g. Pillow==8.2.0
. Unless there are very specific reasons to do so, it is preferable to only pin down the minimal version e.g. Pillow>=8.2.0
to allow for more flexibility in terms of environment setup.
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.