Code Monkey home page Code Monkey logo

slicegan's People

Contributors

dominicwllmsn avatar stke9 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar

slicegan's Issues

Add requirements.txt

Add a requirements.txt file to enable easy quick-start with pip install -r requirements.txt

Missing file

Hi there,
In networks.py we have:

if Training:
    with open(pth + '_params.data', 'wb') as filehandle:
        # store the data as binary data stream
        pickle.dump(params, filehandle)
# if loading model, load the associated params file
else:
    with open(pth + '_params.data', 'rb') as filehandle:
        # read the data as binary data stream
        dk, ds, df, dp, gk, gs, gf, gp  = pickle.load(filehandle)

However, the file named '*_params.data' is not included in the repository. Can you please provide some guidance?

Thanks a lot

About SliceGAN

Hi
I'm glad to meet you.

My name is Asadullah.
I'm master student in Tokyo.

I ran with your code that you provided and generation with the images you use worked fine.
However, I tried to generate to 3D structure myself using the images 3 pieces and could not get it to work.
If you know how to do it, could you please let me know.

the other data

Hi,can I get the other data sets used for training in the paper,such as colour images used for training in the paper.ths.

RuntimeError: Given groups=1, weight of size [64, 3, 4, 4], expected input[32, 238, 64, 64] to have 3 channels, but got 238 channels instead

Dear Steve,

as I just tested a arbitary image trying to generate a 3D structure using your SliceGAN,

I encountered the following issue:

File "run_slicegan.py", line 52, in
model.train(Project_path, image_type, data_type, data_path, netD, netG, img_channels, img_size, z_channels, scale_factor)
File "/work/scratch/ac01asac/SliceGAN/slicegan/model.py", line 104, in train
out_real = netD(real_data).view(-1).mean()
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 150, in forward
return self.module(*inputs, **kwargs)
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1015, in call_impl
return forward_call(*input, **kwargs)
File "/work/scratch/ac01asac/SliceGAN/slicegan/networks.py", line 55, in forward
x = F.relu
(conv(x))
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1015, in _call_impl
return forward_call(*input, **kwargs)
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 443, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/home/ac01asac/.local/lib/python3.8/site-packages/torch/nn/modules/conv.py", line 439, in _conv_forward
return F.conv2d(input, weight, bias, self.stride,
RuntimeError: Given groups=1, weight of size [64, 3, 4, 4], expected input[32, 238, 64, 64] to have 3 channels, but got 238 channels instead.

  • seems that there is some compatibility issue. I used the following image, and specified the type and name as requested in the run_slicegan.py file.

  • Would you also provide your NMC.tif file in the repo just to give a test?

img

dataset creating memory issue

Hello stke9,

Thank you for the nice work. I have one issue when running the dataset generation in the preprocessing using one tif image my own.

when running:
data = np.empty([32 * 900, len(vals), l, l])
i got erroa message that the np core issue, can not allocate 200 G memory for the array (28800, ?, 64, 64)
in data type 'float64' (forget the number of vals)
so my question is what the 32*900 means. i have a GPU with only 5 G memory size, can i change the value to something else?
however, when i use the input image with the NMC.tif in your Example file, i dont get the erroa. what could be the reason for this?

best regards,
OP

GPU utilization

Hi,

First, thanks for developing such a great model.

I am testing training the model based on the test NMC image on a quadro p5000 before I move on to my own images. With the default settings the model uses about 5GB of GPU RAM and only 25% of GPU compute capacity. I have increased both the batch_size and D_batch_size to 24 since my GPU has 16GB of RAM. However, this has not made the model use any more GPU compute capacity (only increased the RAM usage). Is there something else I should change to allow the GPU to utilize it's full power?

Thanks,

Hannah

test plotter problem

Hello Steven,

When the training loop went to

util.test_plotter(img, 5, imtype, pth)

a error occour and i checked the test_plotter function in util.py. Seems the code should be okey. at least i could not found a problem.
so i commented the line, the training went well just no test plot saved.

you might have a better idea?

best regards,

OP

Using 'array' does not seem to work

Setting data_type='array' causes an exception in preprocessing.batch, that datasetxyz is not defined, as 'array' is not used in any of the keywords. As a quick workaround, I added it to grayscale part as it was appropriate for my data as follows:

...
    elif data_type == 'grayscale' or data_type == "array":
        datasetxyz = []
        uniques = None
        for img in data:
            if data_type == "grayscale":
                img = plt.imread(img)
            else:
                img = np.load(img)
...

It does run like this but I am not sure this is the correct solution/appropriate for the rest of the pipeline.

requirements

Hi,
Can you please say which version of python, pytorch and other modules you are using? And also if you have tested on multiple GPUs? I get quite a few strange errors when I use python 3.10, torch1.13.1, cuda11.7, torchvision0.14.1, torchaudio 0.13.1.

When I run on four GPUs (Tesla V100s) the generator will not load after training.

raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for Generator:

_pickle.UnpicklingError: A load persistent id instruction was encountered, but no persistent_load function was specified.

When I run on a single GPU the generator makes images of all zeros. However, the training slices snapshot shows a great image

I think it is probably due to the versions. Can you advise?

Thanks

Hannah

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.