Skip to content

Commit c3b59e9

Browse files
erjelalejuAlexander Jungvicramrericj
authored
Add docs from other repository (aleju#21)
* Initial commit * Add doc files from imgaug repo * Remove .idea folder * Add images of main repo readme * Add ChannelShuffle, update Rot90, fix overview heatmap sizes * Improve design of gifs and gif-table, merge gifs of same augmenters * Improve gifs table design * Add source code of library for now Due to RTD no longer understanding git submodules, the docs will have to be built directly from imgaug-doc. This requires this repo to contain the current source code of the library in order to autogenerate the API docs. Hence it is added. * Uncomment drawing functions * Increase version to 0.2.7 * Update code to latest state of library * Add dtype parsing script * Update code to latest state from main repo * Change write path of dtype images * Add dtype support documentation * Reformulate and update library description * Update to latest state of main repo * Improve dtype images design and update to code state * Update code to latest state in main repo * Update code to main repo state * Update dtype doc * Add new histogram-based contrast augmenters; fix seed problem * Update code to latest version * Add performance doc page * Update code to latest version * Add performance measurments scripts * Improve performance docs * Rename Scale to Resize * Rename all .cut_out_of_image() to .clip_out_of_image() * Update code to latest version of main repo * Add notebooks readme * Update code to latest version in main repo * Increase version number * Add notebook about stochastic parameters * Add doc page for jupyter notebooks * Update to newest version of main repo * Add polygons to small overview images * Add polygons to augmenters gifs * Improve images for small overview * Rename notebooks * Add polygon aug notebook * Update notebook links in readme * Add control flow notebook * Add notebook about copying random states * Update main repo code to line string version * Adapt to new argument names * Rename *_line to *_lines to LS/poly drawing * Add line string notebook to readme * Add line strings notebook to RTD * Update doc sources overlay -> blend * Readd script to generate doc images & update BB code examples * Update BB docs to newest lib version & increase quality * Update basic examples to newest lib version * Update keypoints docs to newest lib version * Update heatmaps docs to newest lib version + increase jpg quality * Update segmap docs to 0.2.9; Fix examples; Increase jpg quality * Update code to 0.2.9 * Update version number to 0.2.9 * Update copyright year to 2019 * Add project description * Add missing files to API * Fix formatting error * Fix docstring errors * Add a clarification about Fliplr/Flipud * Update code for output_buffer_size * Add conda install section * Update library code to latest version * Add API source page for augmenters.edges module * Add API source page for augmenters.pooling module * Remove 'Beta' notice in segmaps docs * Update RTD segmap to 0.3.0 & improve style & fix typos * Improve heatmaps RTD doc style * Enforce linebreak in code segment * Rename source file of augmenter overview page * Improve style of augmenter overview page * Add todos for missing augmenters to overview & reorder sections * Split overview page into multiple subpages * Move flip-related notes to bottom of each subsection * Redesign 'note' blocks for flipud/fliplr * Add performance notes * Split generate_documentation_images.py into subfiles * Decrease compression strength of RTD images * Add RTD overview for AdditiveLaplaceNoise * Fix outdated RTD overview AdditiveGaussianNoise, decrease img compression * Add RTD overview for AdditivePoissonNoise * Fix typos in RTD arithm overview & improve formulations * Add RTD overview for ReplaceElementwise * Add RTD overview for ImpulseNoise * Add RTD overview for SaltAndPepper * Add RTD overview for CoarseSaltAndPepper * Add RTD overview for Salt, Pepper, CoarseSalt, CoarsePepper * Add RTD overview for JpegCompression * Add RTD overview for BilateralBlur * Add RTD overview for MotionBlur * Add RTD overview for Alpha * Add RTD overview for AlphaElementwise * Add RTD overview for SimplexNoiseAlpha * Add RTD overview for FrequencyNoiseAlpha * Improve RTD overview for WithColorspace * Add RTD overview for WithHueAndSaturation * Add RTD overview for MultiplyHueAndSaturation * Add RTD overview for MultiplyHue * Add RTD overview for MultiplySaturation * Add RTD overview for AddToHueAndSaturation * Add RTD overview for AddToHue * Add RTD overview for AddToSaturation * Add RTD overview for KMeansColorQuantization * Add RTD overview for UniformColorQuantization * Add RTD overview for GammaContrast * Add RTD overview for SigmoidContrast * Add RTD overview for LogContrast * Add RTD overview for LinearContrast * Add RTD overview for AllChannelsCLAHE * Add RTD overview for CLAHE * Add RTD overview for AllChannelsHistogramEqualization * Add RTD overview for HistogramEqualization * Add RTD overview for Canny * Add RTD overview for PerspectiveTransform * Add RTD overview for Rot90 * Add RTD overview for ChannelShuffle * Add RTD overview for AveragePooling * Add RTD overviews for MaxPooling, MinPooling and MedianPooling * Add RTD overviews for all Voronoi augmenters * Add RTD overviews for Pad- and CropToFixedSize * Add RTD overview for KeepSizeByResize * Add RTD overviews for weather augmenters * Add example sub-headlines to overview pages * Change year in docs to automatically adjust to current year * Fix rst errors * Add import statements to RTD overviews * Add API links to RTD overviews * Add .random module API page * Add .validation module API page * Update code to latest version * Fix jupyter notebook link * Update library code to latest version * Add readme gifs for v0.3.0 augmenters * Synchronize requirements.txt with main repo * Improve dtype coll. script (error messages, hide private funcs) * Update library files to latest commit * Update dtype support docs to latest library commit * Update performance numbers to 0.3.0 * Synchronize code with main repo * Improve performance docs * Synchronize code with main repo * Change version number to 0.3.0 * Update docs to v0.4.0 (#15) This patch updates the documentation to release 0.4.0. Rough changes: * Updated code base to main repo version at release. * Updated API pages to 0.4.0 state. * Updated augmenter overview to 0.4.0 augmenters. * Updated performance numbers and corresponding script to 0.4.0 state. * Updated dtype support to 0.4.0 augmenters and functions. * Updated script that generates augmenter gifs used in main repo README to 0.4.0 augmenters. * Updated installation description. * Updated jupyter notebooks to use newer augmentation calls and no longer deprecated methods. * Moved jupyter notebook on deterministic mode to the "advanced" section of notebooks. * Partially updated page on blending augmenters. * Added images and generation script for 0.4.0 changelog. * Increase version number to 0.4.0 * Add output-stripped notebooks * Remove unnecessary imgaug code * Moved files to docs/ * [skip ci] rf: include docs directory in repo * [skip ci]: changed: Moved _downloader.py from checks to imgaug * [skip ci] refactored: Cached download of online images for example images in docs * Enable dtype support matrix script on Windows * Multiple fixes in `collect_dtype_support.py` * Fix tempfile issue for readme image generation script * Add `beautifulsoup4` as explicit dependency for building the documentation * utils cannot be imported with a relative import * Fix incorrect dtype docstrings * moved collect_dtype_support.py * move generate_rtd_images to new directory * move measure performance scripts to new directory * move changelog generation script to new location * move readme example generation to new location * Use python based script trigger * Sucessfully local build verified * fix: Use Wikimedia prefered thumbnail sizes * doc: Add pull request link * docs: try to build the docs [skip ci] * doc: Create readme images as part of the documentation [skip ci] * docs: Use RTD images for github README file [skip ci] --------- Co-authored-by: Alexander Jung <kontakt@ajung.name> Co-authored-by: Alexander Jung <alexander.jung@zenuity.com> Co-authored-by: Vicram Rajagopalan <42707603+vicramr@users.noreply.github.com> Co-authored-by: ericj <ericj@noreply.codeberg.org>
1 parent 2836c45 commit c3b59e9

140 files changed

Lines changed: 29476 additions & 282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,3 @@ docs/_build/
7676

7777
# PyBuilder
7878
target/
79-
80-
# Extra docs repository
81-
docs

README.md

Lines changed: 124 additions & 124 deletions
Large diffs are not rendered by default.

changelogs/master/summary.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,35 @@ The inplace modification of `image_fg` caused errors when applied on non-C-conti
2121
Thus, the function was changed such that it always returns copies, even when called with `inplace=True`.
2222
It was verfied that calling functions do not rely on inplace modifications for proper functionality.
2323

24+
## Moved image `_downloader.py` from `checks` to `imgaug` [#21](https://github.com/imaug/imaug/pull/21)
25+
For creating the example images for the documentation it is necessary to download online sample images
26+
similar to the workflow for the checks. Instead of copy the `download` function for the documentation,
27+
the function was moved to serve as a general utility function for the library.
28+
29+
## Add `beautifulsoup4` as explicit dependency for building the documentation [#21](https://github.com/imaug/imaug/pull/21)
30+
The dependency `dashtable.html2rst` depends on `beautifulsoup4` as optional dependency.
31+
32+
## Switch from bash to python for collecting example image generation scripts [#21](https://github.com/imaug/imaug/pull/21)
33+
Replace `gen_all.sh` with `generate_all.py` for better cross platform compatibility.
34+
35+
## Use readthedocs images for README file instead of github files [#21](https://github.com/imaug/imaug/pull/21)
36+
Use the images in RTD for github README.md file for smaller repository size.
37+
2438
# Refactored
2539

40+
## Add cached downloader to example image creation for documentation [#21](https://github.com/imaug/imaug/pull/21)
41+
Added `pooch` caching for online data to the example creation scripts
42+
* `generate_main_repo_readme_images.py`
43+
* `gen_v040_changelog_images.py`
44+
* `gen_overview_artistic.py`
45+
* `gen_overview_blend.py`
46+
* `gen_overview_color.py`
47+
* `gen_overview_weather.py`
48+
49+
## Change `utils` import in all scripts for rtd example images [#21](https://github.com/imaug/imaug/pull/21)
50+
Without a `imaug-docs` package there are no realtive imports allowed. Thus the utilities need to be imported
51+
by a standard local import call.
52+
2653
# Fixed
2754

2855
## Verified checks [#19](https://github.com/imaug/imaug/pull/19)
@@ -76,10 +103,43 @@ base array when used as CV2 input, but does not change it when used as CV2 desti
76103
also the destination array matches the CV2 requirements, while sacrificing the (real) inplace modification of
77104
`image_fg`.
78105

106+
## Multiple fixes in `collect_dtype_support.py` [#21](https://github.com/imaug/imaug/pull/21)
107+
Remove call for `matplotlib.Figure._cachedRenderer` and incorrectly masked regular expression
108+
pattern.
109+
110+
## Fix incorrect dtype docstrings [#21](https://github.com/imaug/imaug/pull/21)
111+
The script `collect_dtype_support.py` is very sensitive to incorrectly defined dtype docstrings.
112+
Pull request [#640](https://github.com/aleju/imgaug/pull/640) introduced a circular look-up definition
113+
in `imgaug.augmenters.segmentation`for the class `Voronoi`. Another problem was a misplacement of the
114+
version added docstring in `imgaug.augmenters.arithmetrics` for the function `cutout` in
115+
[#598](https://github.com/aleju/imgaug/pull/598).
116+
117+
## Download image data from Wikipedia in pre-calculated sizes [cb:#1](https://codeberg.org/ericj/imaug/pulls/1)
118+
All download data come from Wikipedia. It became a little stricter with respect to the
119+
URL-based downloadable thumbnail sizes. Adhere to the recommended thumbnail size to prevent
120+
problems.
121+
79122
# Improved
80123

81124
## Handling of views in `_multiply_elementwise_to_uint8_`[#19](https://github.com/imaug/imaug/pull/19)
82125
The elementwise multiplication with `cv2.multiply` breaks if a
83126
RGB image is sliced in the channel dimension and used as destination.
84127
The error only seems to occur if the view's base shape has a singular first
85128
dimension. Therefore a true copy of the image is used as destination instead.
129+
130+
## Enable dtype support matrix script on Windows [#21](https://github.com/imaug/imaug/pull/21)
131+
The original `collect_dtype_support.py` script hard-coded the front-slash directory separator and
132+
assumed a root suffix. Replaced it with the OS specific separator and make script more robust with respect
133+
to relative directory definitions.
134+
135+
## Fix tempfile issue for readme image generation script[#21](https://github.com/imaug/imaug/pull/21)
136+
According to https://stackoverflow.com/a/54768241 Windows struggles with `NamedTemporaryFile` without
137+
the additional parameter `delete_on_close=False`.
138+
139+
## Store all generated documentation images in a single folder[#21](https://github.com/imaug/imaug/pull/21)
140+
Moved and reorganized scripts for the example data generation and its outputs.
141+
* `docs/scripts/images_documentation/collect_dtype_support.py` outputs to `docs/images/dtype_support/*.png`
142+
* `docs/scripts/images_documentation/gen_*.py` outputs to `docs/images/**/*.jpg`
143+
* `docs/scripts/tables_performance/*.py` outputs to `docs/measure_performance_results/results_*.pickle`
144+
* `docs/scripts/images_changelogs/gen_v040_changelog_images.py` outputs to `docs/images/changelogs/0.4.0/*.jpg`
145+
* `docs/scripts/images_readme/generate_main_repo_readme_images.py` outputs to `docs/images/readme_images/augmenter_videos/**/*.gif`

checks/_downloader.py

Lines changed: 0 additions & 100 deletions
This file was deleted.

checks/check_blendalphasomecolors.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import print_function, division, absolute_import
22

33
import imageio
4+
45
import imgaug as ia
56
import imgaug.augmenters as iaa
6-
7-
from _downloader import download
8-
7+
from imgaug._downloader import download
98

109
def main():
1110
aug = iaa.BlendAlphaMask(
@@ -22,10 +21,10 @@ def main():
2221
]))
2322

2423
files = [
25-
'data/320px-Vincent_van_Gogh-Wheatfield.jpg',
26-
'data/320px-Sarcophilus_harrisii_taranna.jpg',
27-
'data/207px-Galerella_sanguinea_Zoo_Praha_2011-2.jpg',
28-
'data/307px-Ambrosius_Bosschaert_the_Elder-Flower_Still_Life.jpg',
24+
'data/330px-Vincent_van_Gogh-Wheatfield.jpg',
25+
'data/330px-Sarcophilus_harrisii_taranna.jpg',
26+
'data/250px-Galerella_sanguinea_Zoo_Praha_2011-2.jpg',
27+
'data/330px-Ambrosius_Bosschaert_the_Elder-Flower_Still_Life.jpg',
2928
]
3029

3130
for file in files:

checks/check_cartoon.py

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
import imgaug as ia
2-
import imgaug.augmenters as iaa
31
import imageio
42

5-
from _downloader import download
6-
3+
import imgaug as ia
4+
import imgaug.augmenters as iaa
5+
from imgaug._downloader import download
76

87
def main():
98
data_small = [
10-
"data/320px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
11-
"data/320px-Barack_Obama_family_portrait_2011.jpg",
12-
"data/320px-Pahalgam_Valley.jpg",
13-
"data/320px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
14-
"data/320px-Salad_platter.jpg",
15-
"data/287px-Squirrel_posing.jpg",
9+
"data/330px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
10+
"data/330px-Barack_Obama_family_portrait_2011.jpg",
11+
"data/330px-Pahalgam_Valley.jpg",
12+
"data/330px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
13+
"data/330px-Salad_platter.jpg",
14+
"data/250px-Squirrel_posing.jpg",
1615
]
1716
data_medium = [
18-
"data/640px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
19-
"data/640px-Barack_Obama_family_portrait_2011.jpg",
20-
"data/640px-Pahalgam_Valley.jpg",
21-
"data/640px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
22-
"data/640px-Salad_platter.jpg",
23-
"data/574px-Squirrel_posing.jpg",
17+
"data/500px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
18+
"data/500px-Barack_Obama_family_portrait_2011.jpg",
19+
"data/500px-Pahalgam_Valley.jpg",
20+
"data/500px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
21+
"data/500px-Salad_platter.jpg",
22+
"data/500px-Squirrel_posing.jpg",
2423
]
2524
data_large = [
26-
"data/1024px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
27-
"data/1024px-Barack_Obama_family_portrait_2011.jpg",
28-
"data/1024px-Pahalgam_Valley.jpg",
29-
"data/1024px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
30-
"data/1024px-Salad_platter.jpg",
25+
"data/960px-Physicist_Stephen_Hawking_in_Zero_Gravity_NASA.jpg",
26+
"data/960px-Barack_Obama_family_portrait_2011.jpg",
27+
"data/960px-Pahalgam_Valley.jpg",
28+
"data/960px-Iglesia_de_Nuestra_Señora_de_La_Blanca.jpg",
29+
"data/960px-Salad_platter.jpg",
3130
]
3231

3332
for dataset in [data_small, data_medium, data_large]:

checks/check_clouds.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
import imgaug as ia
66
from imgaug import augmenters as iaa
7-
from _downloader import download
8-
7+
from imgaug._downloader import download
98

109
def main():
1110
for size in [0.1, 0.2, 1.0]:

checks/check_fast_snowy_landscape.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import print_function, division
2+
23
import imageio
34

45
import imgaug as ia
56
from imgaug import augmenters as iaa
6-
7-
from _downloader import download
8-
7+
from imgaug._downloader import download
98

109
def main():
1110
image = imageio.imread(download('data/Kukle_Czech_Republic.jpg'))

checks/check_fog.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
import imgaug as ia
66
from imgaug import augmenters as iaa
7-
8-
from _downloader import download
9-
7+
from imgaug._downloader import download
108

119
def main():
1210
for size in [0.1, 0.2, 1.0]:

checks/check_rain.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from __future__ import print_function, division, absolute_import
2+
23
import imageio
34

45
import imgaug as ia
56
from imgaug import augmenters as iaa
6-
7-
from _downloader import download
8-
7+
from imgaug._downloader import download
98

109
def main():
1110
augs = [

0 commit comments

Comments
 (0)