Giter Site home page Giter Site logo

albumentations_examples's People

Contributors

benihime91 avatar bloodaxe avatar creafz avatar dipet avatar dskkato avatar ivysochyn avatar juanma9613 avatar rgaiacs avatar sergiopaniego avatar ternaus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

albumentations_examples's Issues

Reproducible Augmentations fail with A.Perspective()

Related to #23.

Minimal working example

$ git rev-parse HEAD
9700da883c9b7fbb5735252d239cd12201b56a47
$ jupyter nbconvert --to html --execute notebooks/serialization.ipynb --output /tmp/first-run.html
[NbConvertApp] WARNING | Config option `kernel_spec_manager_class` not recognized by `NbConvertApp`.
[NbConvertApp] Converting notebook notebooks/serialization.ipynb to html
CONDA_PREFIX=/home/raniere/mambaforge/envs/first-carpal
Traceback (most recent call last):
  File "/home/raniere/mambaforge/envs/jupyter/bin/jupyter-nbconvert", line 10, in <module>
    sys.exit(main())
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/jupyter_core/application.py", line 264, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/traitlets/config/application.py", line 846, in launch_instance
    app.start()
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 414, in start
    self.convert_notebooks()
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 588, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 551, in convert_single_notebook
    output, resources = self.export_single_notebook(
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/nbconvertapp.py", line 479, in export_single_notebook
    output, resources = self.exporter.from_filename(
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 189, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 206, in from_file
    return self.from_notebook_node(
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/html.py", line 215, in from_notebook_node
    return super().from_notebook_node(nb, resources, **kw)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/templateexporter.py", line 384, in from_notebook_node
    nb_copy, resources = super().from_notebook_node(nb, resources, **kw)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 146, in from_notebook_node
    nb_copy, resources = self._preprocess(nb_copy, resources)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/exporters/exporter.py", line 335, in _preprocess
    nbc, resc = preprocessor(nbc, resc)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/preprocessors/base.py", line 47, in __call__
    return self.preprocess(nb, resources)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/preprocessors/execute.py", line 89, in preprocess
    self.preprocess_cell(cell, resources, index)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbconvert/preprocessors/execute.py", line 110, in preprocess_cell
    cell = self.execute_cell(cell, index, store_history=True)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbclient/util.py", line 84, in wrapped
    return just_run(coro(*args, **kwargs))
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbclient/util.py", line 62, in just_run
    return loop.run_until_complete(coro)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
    return future.result()
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbclient/client.py", line 965, in async_execute_cell
    await self._check_raise_for_error(cell, cell_index, exec_reply)
  File "/home/raniere/mambaforge/envs/jupyter/lib/python3.10/site-packages/nbclient/client.py", line 862, in _check_raise_for_error
    raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
assert np.array_equal(transformed['image'], transformed_from_loaded_transform['image'])
------------------

---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
Input In [11], in <cell line: 1>()
----> 1 assert np.array_equal(transformed['image'], transformed_from_loaded_transform['image'])

AssertionError: 
AssertionError:

Multiple target detection

Thank you very much for the wonderful work of the author,I would like to ask you about multi-target detection, there are multiple targets in one picture, how to make data Augmentation with this tool ?
图片

Multi class segmentation

Hi,

I wonder if the built-in transformation for segmentation can handle multiclasses, as I see there are only 2 classes in the examples

Demo or Feature Request: TTA with albumentations

This is like the issue #136 that was closed 2 years ago.

I would like to request a Google Colab example of using Albumentations in TensorFlow for Test Time Augmentations (TTA). The example given in the previous issue thread of pytorch toolkit was not immediately useful to me.

This is really important to me so I'm willing to help $ if it can expedite. I'd like to do some experiments with TTA for my PhD research, and I'm not that great of a programmer.

Thank you

Use Albumentations with dataset

I work on MNIST datasets, I need to enlarge their size by using data augmentation use Albumentations. there are ways to pass a subset of the dataset rather than "for loop", a way like fit, or something like that. All of the examples I've seen only pass one image at a time not datasets.

Error with shadows

Hi, I occasionally get this error when I use A.RandomShadow(p=0.5). If I disable this augmenter in the conveyor, the error does not appear anymore. What can it be related to?

File "C:\Users****\anaconda3\envs\python_torch\lib\site-packages\albumentations\augmentations\functional.py", line 915, in add_shadow
cv2.fillPoly(mask, vertices, 255)
cv2.error: OpenCV(4.5.4) 👎 error: (-5:Bad argument) in function 'fillPoly'
Overload resolution failed:

  • Layout of the output array img is incompatible with cv::Mat
  • Expected Ptrcv::UMat for argument 'img'

Migrating from torchvision to Albumentations/ Using albumentations with PIL (Normalize)

it is mentioned how to convert torchvision transform:normalize to albumetaions transform:normalize when using the same pipe line.
but it is not metioned how to convert torchvision normalize to albumentaions normalize when using albumentaions with PIL.

If it is impossible, I'd appreciate it if you could mention it. If it is possible, please give use some example. Thank you

Support of a special Pad operation

Hello
How are you?
Thanks for contributing to this project.
I am going to implement an operation for center-padding along with the shortest side while keeping the longest side.
There is the operation named "CenterPadToSquare" in "imgaug" library (https://github.com/aleju/imgaug).
image

But I can NOT find/implement such an operation/combination in this library.
Could u help me?

resized_image = F.resize(image, height=256, width=256)

AttributeError Traceback (most recent call last)
in <cell line: 5>()
3 image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
4
----> 5 resized_image = F.resize(image, height=256, width=256)
6 padded_image = F.pad(image, min_height=512, min_width=512)
7 padded_constant_image = F.pad(image, min_height=512, min_width=512, border_mode=cv2.BORDER_CONSTANT)

AttributeError: module 'albumentations.augmentations.functional' has no attribute 'resize'

Divided by zero error

Hi,
thanks for providing this awesome package :)
Is the problem just me or has it been seen by others?
...\lib\site-packages\albumentations\augmentations\functional.py:1258: RuntimeWarning: divide by zero encountered in power
table = (np.arange(0, 256.0 / 255, 1.0 / 255) ** gamma) * 255

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.