Code Monkey home page Code Monkey logo

ganfingerprints's Issues

What is the label order for test?

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

What is the label order when testing ?

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

Classifier Issues

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).

  • The environment had to be build as CUDA 10.0, Python3.7, and tensorflow-gpu 1.13.1, as previous versions were incompatible
  • once run with the pk pre-trained model provided, in file GANFingerprints/classifier/util_scripts.py, line 23 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.
  • upon running the classifier, assignment of labels gets skipped over. This would mean it does not match the labels at the top. What could we use as labels if logits.shape[1] = 1?
  • If I use labels as list(labels_1) or list(labels_2) , it classifies everything as from CelebA, which is incorrect as the dataset I am passing in is all fake images generated from sngan model.

Please let me know how I can fix this.
Thanks

Both CramerGAN and MMDGAN export wrong images.

Both CramerGAN and MMDGAN export images with wrong colors:

CRAMER_00000000CRAMER_00000001CRAMER_00000002

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.