Exemple #1
0
import cv2
import neural_obfuscator as no

model = no.Obfuscator(method="pixelate")
img = cv2.imread("../assets/mila.jpg")
img_gdpr = model.obfuscate(img)
no.show_image(img_gdpr)
Exemple #2
0
import numpy as np
import torch
import neural_obfuscator as no

model = no.StyleGAN(weights="ffhq")
latents = np.random.RandomState(5).randn(1, 512).astype(np.float32)
latents = torch.from_numpy(latents)
imgs = model.forward(latents)

no.show_image(imgs[0])