Code Monkey home page Code Monkey logo

3d_cyclegan's People

Contributors

perronea avatar

Stargazers

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

Watchers

 avatar  avatar

3d_cyclegan's Issues

How to prepare the data set

I want to generate brain images from brain masks. But I don't how to prepare data. Is the test set used in the training process? I only put datas in train set. But I got a "index 0 is out of bounds for axis 0 with size 0" error.

ValueError: index can't contain negative values

Hi~

I have some problems with data. I use HCP datasets, the image size is 260x311x260. First, I run prepare_train_data.py to crop data, the result is :

Smallest recommended input image shape: [260 311 260]

Then, I try to run CycleGAN_3D.py to train these data, I encounter a problem:

Traceback (most recent call last):
File "CycleGAN_3D.py", line 994, in
GAN = CycleGAN()
File "CycleGAN_3D.py", line 126, in init
subfolder=image_folder)
File "/3D_MRI_GAN/load_crop_data.py", line 30, in load_data
train_A_images = create_image_array(train_A_image_names, train_A_path, nr_of_channels, img_shape)
File "/3D_MRI_GAN/load_crop_data.py", line 58, in create_image_array
image = np.pad(image,((x1_pad,x2_pad),(y1_pad,y2_pad),(z1_pad,z2_pad)), mode='constant')
File "<array_function internals>", line 6, in pad
File "/environments/3D_MRI_GAN/lib/python3.6/site-packages/numpy/lib/arraypad.py", line 741, in pad
pad_width = _as_pairs(pad_width, array.ndim, as_index=True)
File "/environments/3D_MRI_GAN/lib/python3.6/site-packages/numpy/lib/arraypad.py", line 512, in _as_pairs
raise ValueError("index can't contain negative values")
ValueError: index can't contain negative values

I don't understand the meaning of this error. Could you offer some suggestions for this error?

Thanks!

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.