Skip to content

Commit

Permalink
replace cluster package with KMeansColorQuantization2D in color packa…
Browse files Browse the repository at this point in the history
…ge (#105)

* replace cluster package with KMeansColorQuantization2D in color package

* add functional forms of augment

* nit

* nits
  • Loading branch information
ASEM000 authored Apr 9, 2024
1 parent 282cd94 commit 13e6a95
Show file tree
Hide file tree
Showing 28 changed files with 385 additions and 662 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,7 @@ net = sk.tree_unmask(net)
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Filter | - `{FFT,_}{Avg,Box,Gaussian,Motion}Blur2D` <br> - `{JointBilateral,Bilateral,Median}Blur2D` <br> - `{FFT,_}{UnsharpMask}2D` <br> - `{FFT,_}{Sobel,Laplacian}2D` <br> - `{FFT,_}BlurPool2D` |
| Augment | - `Adjust{Sigmoid,Log}2D` <br> - `{Adjust,Random}{Brightness,Contrast,Hue,Saturation}2D`, <br> - `RandomJigSaw2D`,`PixelShuffle2D`, <br> - `Pixelate2D`,`Posterize2D`,`Solarize2D` <br> - `FourierDomainAdapt2D` |
| Geometric | - `{Random,_}{Horizontal,Vertical}{Translate,Flip,Shear}2D` <br> - `{Random,_}{Rotate}2D` <br> - `RandomPerspective2D` <br> - `{Random,_}WaveTransform2D` <br> - `{FFT,_}ElasticTransform2D` |
| Geometric | - `{Random,_}{Horizontal,Vertical}{Translate,Flip,Shear}2D` <br> - `{Random,_}{Rotate}2D` <br> - `RandomPerspective2D` <br> - `{FFT,_}ElasticTransform2D` |
| Color | - `RGBToGrayscale2D` , `GrayscaleToRGB2D` <br> - `RGBToHSV2D`, `HSVToRGB2D` |

#### 🌈 Cluster package: `serket.cluster`

| Group | Layers |
| ---------- | ---------- |
| Clustering | - `KMeans` |

</details>
33 changes: 21 additions & 12 deletions docs/API/augment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,34 @@ Augment API
.. currentmodule:: serket.image

.. autoclass:: AdjustBrightness2D
.. autoclass:: RandomBrightness2D

.. autoclass:: AdjustContrast2D
.. autoclass:: RandomContrast2D

.. autoclass:: AdjustHue2D
.. autoclass:: RandomHue2D

.. autoclass:: AdjustLog2D

.. autoclass:: AdjustSaturation2D
.. autoclass:: RandomSaturation2D

.. autoclass:: AdjustSigmoid2D
.. autoclass:: RandomJigSaw2D
.. autoclass:: FourierDomainAdapt2D
.. autoclass:: Pixelate2D
.. autoclass:: PixelShuffle2D
.. autoclass:: Posterize2D

.. autoclass:: RandomBrightness2D
.. autoclass:: RandomContrast2D
.. autoclass:: RandomHue2D
.. autoclass:: RandomJigSaw2D
.. autoclass:: RandomSaturation2D
.. autoclass:: Solarize2D

.. autoclass:: FourierDomainAdapt2D
.. autofunction:: adjust_brightness_2d
.. autofunction:: adjust_contrast_2d
.. autofunction:: adjust_hue_3d
.. autofunction:: adjust_log_2d
.. autofunction:: adjust_sigmoid_2d
.. autofunction:: fourier_domain_adapt_2d
.. autofunction:: pixel_shuffle_3d
.. autofunction:: pixelate_2d
.. autofunction:: posterize_2d
.. autofunction:: random_brightness_2d
.. autofunction:: random_contrast_2d
.. autofunction:: random_hue_3d
.. autofunction:: random_jigsaw_2d
.. autofunction:: random_saturation_3d
.. autofunction:: solarize_2d
8 changes: 0 additions & 8 deletions docs/API/cluster.rst

This file was deleted.

4 changes: 3 additions & 1 deletion docs/API/color.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ Color API
.. autoclass:: GrayscaleToRGB2D
.. autoclass:: RGBToHSV2D
.. autoclass:: HSVToRGB2D
.. autoclass:: KMeansColorQuantization2D

.. autofunction:: rgb_to_grayscale
.. autofunction:: grayscale_to_rgb
.. autofunction:: rgb_to_hsv
.. autofunction:: hsv_to_rgb
.. autofunction:: hsv_to_rgb
.. autofunction:: kmeans_color_quantization_2d
4 changes: 0 additions & 4 deletions docs/API/geometric.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,11 @@ Geometric API
.. autoclass:: VerticalShear2D
.. autoclass:: RandomVerticalShear2D


.. autoclass:: VerticalFlip2D
.. autoclass:: RandomVerticalFlip2D

.. autoclass:: VerticalTranslate2D
.. autoclass:: RandomVerticalTranslate2D

.. autoclass:: WaveTransform2D
.. autoclass:: RandomWaveTransform2D

.. autoclass:: ElasticTransform2D
.. autoclass:: FFTElasticTransform2D
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ Install from github::

notebooks/layers_overview
API/common
API/cluster
API/nn
API/image
API/sepes
Expand Down
3 changes: 1 addition & 2 deletions serket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
value_and_tree,
)

from serket import image, nn
from serket._src.containers import RandomChoice, Sequential
from serket._src.custom_transform import tree_eval, tree_state

from . import cluster, image, nn

__all__ = [
# sepes
# module utils
Expand Down
13 changes: 0 additions & 13 deletions serket/_src/cluster/__init__.py

This file was deleted.

Loading

0 comments on commit 13e6a95

Please sign in to comment.