IEEE Transactions on Medical Imaging
For information on how to run the code please visit vess2ret
IEEE Transactions on Medical Imaging
For information on how to run the code please visit vess2ret
Hi @costapt and @diazandr3s,
Would you please share the annotations of Messidor-1 dataset that used in the code?
Anyone here may help with this issue please?
Thanks
hi @costapt @diazandr3s .I read your paper and I'm very interested in ISC evaluation indicators.Could you share me the code of metrics ISC score? Or where can I find the code about metrics you used? Thanks!
@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
Dear sir,
would you provide your trained model?
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.
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.
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.
Hello, I noticed that clicking the link below will jump to another same code project. What's the difference between the two projects? Can the code here work normally?Thank you!
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))
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?
Hi @costapt
Kindly, can you please tell how many epochs you used to get such quality for both vessels tree and retinal images as in the paper?
Thanks
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)
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.