sh4174 / 3dstylegan Goto Github PK
View Code? Open in Web Editor NEW3D StyleGAN2 for Medical Images
3D StyleGAN2 for Medical Images
Hi,
I want to ask how to prepare dataset for this code? In the following code:
python dataset_tool.py create_from_images3d [TFRecord_Folder/TFRecord_Name] [NIFTI Data Folder] --shuffle 1 --base_size 5 6 7
What is [TFRecord_Folder/TFRecord_Name] and [NIFTI Data Folder]. And what should be there to run this file. Thank you for your help.
Hi great work, and for many times we want to compare with this method but have trouble to reproduce it. Really looking forward to a PyTorch version. Thanks.
Hi, thanks for sharing this wonderful repo for 3DStyleGAN.
When running this code, I encountered the problem: "AttributeError: module 'tensorflow._api.v2.image' has no attribute 'resize_bilinear'".
Do you have any idea how to solve this issue?
Hi, dear author,
In the paper, I noticed "All images were skull-stripped, affine-aligned, resampled to 1mm isotropic resolution, and trimmed to 160×192×224 size using FreeSurfer". Can you share the detail or code tool for this preprocessing?
I downloaded the ADNI dataset from the official website, but the resolution seems to be 256×256×256.
Thanks!
Can this model obtain a corresponding 3D model based on MRI or CT data, for example, if the input is human brain MRI, can a 3D brain model be obtained
Hi,
I'm trying to use this codebase to train my own data. However there is an error I have no clue how to solve.
My environment build with RTX 3090 with 470 driver , cuda11.8, cudnn8.6 tensorflow2.4.0
here is the error message
Compiling... Loading... Failed!
Traceback (most recent call last):
File "run_training.py", line 588, in
main()
File "run_training.py", line 583, in main
run(**vars(args))
File "run_training.py", line 512, in run
dnnlib.submit_run(**kwargs)
File "/work16t/yshi/3DStyleGAN/dnnlib/submission/submit.py", line 343, in submit_run
return farm.submit(submit_config, host_run_dir)
File "/work16t/yshi/3DStyleGAN/dnnlib/submission/internal/local.py", line 22, in submit
return run_wrapper(submit_config)
File "/work16t/yshi/3DStyleGAN/dnnlib/submission/submit.py", line 280, in run_wrapper
run_func_obj(**submit_config.run_func_kwargs)
File "/work16t/yshi/3DStyleGAN/training/training_loop_3d.py", line 165, in training_loop
G = tflib.Network('G', num_channels=training_set.shape[0], resolution=min_res, label_size=training_set.label_size, **G_args)
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/network.py", line 99, in init
self._init_graph()
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/network.py", line 156, in _init_graph
out_expr = self._build_func(*self.input_templates, **build_kwargs)
File "/work16t/yshi/3DStyleGAN/training/networks3d_stylegan2.py", line 195, in G_main
components.synthesis = tflib.Network('G_synthesis', func_name=globals()[synthesis_func], **kwargs)
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/network.py", line 99, in init
self._init_graph()
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/network.py", line 156, in _init_graph
out_expr = self._build_func(*self.input_templates, **build_kwargs)
File "/work16t/yshi/3DStyleGAN/training/networks3d_stylegan2.py", line 425, in G_synthesis_stylegan2_3d_curated_real
x = layer(x, layer_idx=0, fmaps=nf(1), kernel=3)
File "/work16t/yshi/3DStyleGAN/training/networks3d_stylegan2.py", line 376, in layer
x = modulated_conv3d_layer(x, dlatents_in[:, layer_idx], fmaps=fmaps, kernel=kernel, up=up, resample_kernel=resample_kernel, fused_modconv=fused_modconv)
File "/work16t/yshi/3DStyleGAN/training/networks3d_stylegan2.py", line 106, in modulated_conv3d_layer
s = apply_bias_act(s, bias_var=mod_bias_var) + 1 # [BI] Add bias (initially 1).
File "/work16t/yshi/3DStyleGAN/training/networks3d_stylegan2.py", line 75, in apply_bias_act
return fused_bias_act(x, b=tf.cast(b, x.dtype), act=act, alpha=alpha, gain=gain)
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/ops/fused_bias_act.py", line 68, in fused_bias_act
return impl_dict[impl](x=x, b=b, axis=axis, act=act, alpha=alpha, gain=gain)
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/ops/fused_bias_act.py", line 122, in _fused_bias_act_cuda
cuda_kernel = _get_plugin().fused_bias_act
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/ops/fused_bias_act.py", line 16, in _get_plugin
return custom_ops.get_plugin(os.path.splitext(file)[0] + '.cu')
File "/work16t/yshi/3DStyleGAN/dnnlib/tflib/custom_ops.py", line 180, in get_plugin
plugin = tf.load_op_library(bin_file)
File "/home/yshi/anaconda3/envs/3dgan_tf2/lib/python3.8/site-packages/tensorflow/python/framework/load_library.py", line 57, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /work16t/yshi/3DStyleGAN/dnnlib/tflib/_cudacache/fused_bias_act_360d764a7f04fadac3b4f82a88fc103e.so: undefined symbol: _ZN10tensorflow14kernel_factory17OpKernelRegistrar12InitInternalEPKNS_9KernelDefESt17basic_string_viewIcSt11char_traitsIcEESt10unique_ptrINS0_15OpKernelFactoryESt14default_deleteISA_EE
could you tell me what should I do if my image are 256×256×256
Hello, i'm trying to train the 3DStyleGAN with my own MR images. I can add the images with the dataset_tool.py but when i run the training script it works without any output, no error messages, no warnings etc. . I'm currently running the code on the colab but the environment is completely set as far as i can see. What could be the possible cause of this behaviour?
Thank you for your interest.
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.