Giter Site home page Giter Site logo

adversarial_retinal_synthesis's Introduction

adversarial_retinal_synthesis's People

Contributors

costapt avatar diazandr3s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

adversarial_retinal_synthesis's Issues

atob model get nan results

@costapt Hi, I'm trying to use your code, but I met a problem. During the training process, when I tried to see the atob.png, I found that I only got "a" and no "bp". So I debug the training process and found the result of "bp = atob.predict(a)" is a nan array. May you tell me what's wrong with my training process? Thx
atob
2018-12-26 15-26-21

can you help me to solve this error,thank you!!!!

runfile('/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master/train.py', wdir='/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master')
Reloaded modules: models, util, util.data, util.util
Traceback (most recent call last):

File "", line 1, in
runfile('/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master/train.py', wdir='/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master')

File "/home/meng/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 710, in runfile
execfile(filename, namespace)

File "/home/meng/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 101, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master/train.py", line 422, in
is_binary=params.is_a_binary)

File "/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master/models.py", line 235, in g_vae
z = Lambda(sampling, output_shape=(latent_dim,))([z_mean, z_log_var])

File "/home/meng/anaconda3/lib/python3.6/site-packages/Keras-1.2.2-py3.6.egg/keras/engine/topology.py", line 572, in call
self.add_inbound_node(inbound_layers, node_indices, tensor_indices)

File "/home/meng/anaconda3/lib/python3.6/site-packages/Keras-1.2.2-py3.6.egg/keras/engine/topology.py", line 635, in add_inbound_node
Node.create_node(self, inbound_layers, node_indices, tensor_indices)

File "/home/meng/anaconda3/lib/python3.6/site-packages/Keras-1.2.2-py3.6.egg/keras/engine/topology.py", line 172, in create_node
output_tensors = to_list(outbound_layer.call(input_tensors, mask=input_masks))

File "/home/meng/anaconda3/lib/python3.6/site-packages/Keras-1.2.2-py3.6.egg/keras/layers/core.py", line 641, in call
return self.function(x, **arguments)

File "/media/meng/C disk/mjh/gan/end to end /code/adversarial_retinal_synthesis-master/models.py", line 232, in sampling
mean=0., std=1.)

File "/home/meng/anaconda3/lib/python3.6/site-packages/Keras-1.2.2-py3.6.egg/keras/backend/tensorflow_backend.py", line 2935, in random_normal
dtype=dtype, seed=seed)

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/random_ops.py", line 71, in random_normal
shape_tensor = _ShapeTensor(shape)

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/random_ops.py", line 42, in _ShapeTensor
return ops.convert_to_tensor(shape, dtype=dtype, name="shape")

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 836, in convert_to_tensor
as_ref=False)

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 926, in internal_convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 229, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/constant_op.py", line 208, in constant
value, dtype=dtype, shape=shape, verify_shape=verify_shape))

File "/home/meng/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/tensor_util.py", line 472, in make_tensor_proto
"supported type." % (type(values), values))

TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (Dimension(None), 16). Consider casting elements to a supported type.

What versions of keras/etc are you using?

Hey - which versions of keras and other libraries are you using? Trying to run but getting some errors bc my Keras is too new. Could you make a requirements.txt file or just let me know which versions of keras/tf work? Thanks.

request for quality evaluation code ( Mutual Information (MI) , ISC )

Hi @costapt and @diazandr3s,
At the beginning, thank you so much for the amazing work you have done and for making the code accessible to all of us. I have learned a lot from you guys, thanks once again.

Secondly, Please if it is possible to share the code of evaluating the quality of the generated images (i.e. Mutual Information , ISC) as i have made some improvement to the results but i don't know how to implement MI measure nor ISC for evaluation.

Thanks in advance.
Any help from other readers is highly appreciated.

Regards.

ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

Hi,
please, i need help with the following error :
ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None

I fed up trying to solve it and i couldn't find the cause.

note these are my params (you may need to check them):
{'a_ch': 1, 'alpha': 100, 'b_ch': 3, 'base_dir': '/content/drive/MyDrive/dataset_2nd_obj/DRIVE', 'batch_size': 20, 'beta': 100, 'beta_1': 0.5, 'continue_train': False, 'epochs': 100, 'expt_name': 'training_ali', 'height_shift_range': 0.0, 'horizontal_flip': False, 'is_a_binary': True, 'is_a_grayscale': True, 'is_b_binary': False, 'is_b_grayscale': False, 'latent_dim': 16, 'load_to_memory': True, 'log_dir': 'log', 'lr': 0.0002, 'nfatoa': 32, 'nfatob': 32, 'nfd': 32, 'pix2pix': False, 'rotation_range': 0.0, 'save_every': 2, 'target_size': 256, 'train_dir': 'train_dir', 'train_samples': -1, 'val_dir': 'val_dir', 'val_samples': -1, 'vertical_flip': False, 'width_shift_range': 0.0, 'zoom_range': 0.0}

and the error msgs are as follow :
----> train(models, it_train, it_val, params)

in train(models, it_train, it_val, params)
    349         # Evaluate how the models is doing on the validation set.
    350 
--> 351         evaluate(models, generators, losses, val_samples=val_samples)

in evaluate(models, generators, losses, val_samples, verbose)
    139     p2p2p = models.p2p2p
    140 
--> 141     d_loss = d.evaluate_generator(d_gen, val_samples)
in evaluate_generator(self, generator, val_samples, max_q_size, nb_worker, pickle_safe)
   1664                     raise ValueError('output of generator should be a tuple '
   1665                                      '(x, y, sample_weight) '
-> 1666                                      'or (x, y). Found: ' + str(generator_output))

ValueError: output of generator should be a tuple (x, y, sample_weight) or (x, y). Found: None`

NOTE : ** i guess the problem is that the images don't fetched during exeuction. coz It shows that the number of training_samples/val_samples = 0, Although there are 16 images in train_dir and 4 images in val_dir.**

Please any idea why is this problem happening, or why it is showing training_samples and val_samples are 0 not the actual number of images in the train_dir and val_dir?

Please check if you are train learning properly.

Hi, I am having trouble using the code. It was confirmed that the loss of the code discriminator seems strange during the learning process. The result is as follows, which part is the problem? Thank you.

5
7
6
1
2
3
4

8

SystemExit error .. pleasei need help with this error

Hi there,
First of all thank you very much for sharing your code with us.

Kindly, i am trying to execute your code on Colab as it helps specify the versions of Keras and python to be used, so I can initiate exact environment as yours.
using Tensorflow 2.8.0 ,
Keras 1.2.2
and Python 3.7.12

and after i uploaded DRIVE dataset and specify the path.

i got the following error when i execute the script used to train the model.


An exception has occurred, use %tb to see the full traceback.

SystemExit
/usr/local/lib/python3.7/dist-packages/IPython/core/interactiveshell.py:2890: UserWarning: To exit: use 'exit', 'quit', or Ctrl-D.
  warn("To exit: use 'exit', 'quit', or Ctrl-D.", stacklevel=1)

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.