Commit 4580e6c2 authored by narugo1992's avatar narugo1992
Browse files

dev(narugo): add examples

parent 7b94c090
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ imgutils.restore
.. toctree::
    :maxdepth: 3

    adversarial
    nafnet
    scunet
    adversarial
+5 −0
Original line number Diff line number Diff line
@@ -48,6 +48,11 @@ def remove_adversarial_noise(image: ImageTyping, diameter: int = 5, sigma_color:

    :return: Image with adversarial noise removed.
    :rtype: Image.Image

    Examples::
        >>> from imgutils.restore import remove_adversarial_noise
        >>>
        >>> remove_adversarial_noise('adversarial_input.png')
    """
    image = load_image(image, mode='RGB', force_background='white')
    img = np.array(image).astype(np.float32)