ningyu1991 / ganfingerprints Goto Github PK
View Code? Open in Web Editor NEWThe official Tensorflow implementation for ICCV'19 paper 'Attributing Fake Images to GANs: Learning and Analyzing GAN Fingerprints'
License: Other
The official Tensorflow implementation for ICCV'19 paper 'Attributing Fake Images to GANs: Learning and Analyzing GAN Fingerprints'
License: Other
Both CramerGAN and MMDGAN export images with wrong colors:
The error is located in the export images function (equivalent for both GANs):
def inverse_transform(images):
return (images+1.)/2.
def save_images(images, size, image_path):
merged = merge(inverse_transform(images), size)
return scipy.misc.imsave(image_path, merged)
Values passed to save_images
are in the range [0,1]. The call to inverse_transform
rescales them to [0.5, 1], which in turn causes the pixel values to be only in the range [127.5, 255], instead of [0, 255]. This results in colors only from the brighter part of the spectrum, as shown above.
Hello,
I am testing your code on generated images from the pre-trained models you have provided. There are quite a few issues encountered while attempted to run the classifier on this dataset we have creating (testing portion of your code).
C_im = misc.load_network_pkl(model_path)
cannot be used as is anymore when executing line 57 logits = C_im.run(im, minibatch_size=1, num_gpus=1, out_dtype=np.float32)
as this ends up being a tuple. I ended up changing line 23 to G, D, Gs = misc.load_network_pkl(model_path)
and using logits = D.run(im, minibatch_size=1, num_gpus=1, out_dtype=np.float32)
to run the classifier.Please let me know how I can fix this.
Thanks
for example
labels_1 = ['CelebA_real_data', 'ProGAN_generated_data', 'SNGAN_generated_data', 'CramerGAN_generated_data', 'MMDGAN_generated_data'] in util_scripts.py
I've found that if I use a lexicographical order with my own data set, I get an error response
When I tested it with my own data set, I found it wasn't in lexicographic order。
for exmaple,in util_scripts.py
labels_1 = ['CelebA_real_data', 'ProGAN_generated_data', 'SNGAN_generated_data', 'CramerGAN_generated_data', 'MMDGAN_generated_data'].
But in what order should I use my own data set?What is the rule for this order? Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.