thauptmann / 3d-resnet-builder-for-keras Goto Github PK
View Code? Open in Web Editor NEWA module for creating 3D ResNets with different depths and additional features.
License: MIT License
A module for creating 3D ResNets with different depths and additional features.
License: MIT License
At the moment only standard 3D convolutions are used. Different types of spatial-temporal convolutions should be implemented and a choice should be added.
E.g:
Run demo.py with different configurations and add them to the table on the main page.
Hi!
Thank you for sharing your code, which has so many options.
However, I met some problems.
When I directly download the dataset and run the demo. I got the following errors.
ValueError: Dimensions must be equal, but are 8 and 16 for '{{node three_d_convolution_res_net/sequential_36/sequential_2/residual_conv_block_1/Add}} = Add[T=DT_HALF](three_d_convolution_res_net/sequential_36/sequential_2/residual_conv_block_1/sequential_13/sequential_12/batch_normalization_8/Cast_3, three_d_convolution_res_net/sequential_36/sequential_2/residual_conv_block_1/sequential_15/batch_normalization_10/Cast_3)' with input shapes: [?,?,8,8,128], [?,?,16,16,128].
I thought maybe it is the problem with the input size.
So I used my own code with your ResNet architecture part. My input is size is [16 (frame), 112, 112, 3] (3 channels not 1 in your demo). with batchszie = 8.
However, this time it returned the following error:
tensorflow.python.framework.errors_impl.InvalidArgumentError: required broadcastable shapes at loc(unknown) [Op:Add]
Then I get into the network part, I found in 'residual_conv_block_1', after calculating
intermediate_output = self.resnet_conv_block(inputs, training=training)
shortcut = self.shortcut_conv(inputs, training=training)
The shape of inputs is [8, 3, 27, 27, 64], the shape of intermediate_output is [8, 1, 7, 7, 128], the shape of shortcut is [8, 2, 14, 14, 128], so they can not be added output_sum = tf.add(intermediate_output, shortcut)
here.
Do you have any ideas about these problems?
I am sorry for my long issue.
Thank you very much.
Hello, and thank you for your work on this module.
I'm interested in training a 3D ResNet to predict a 3D image from a 2-channel 3D image, where input shape is (240, 240, 240, 2) and output shape is (240, 240, 240, 1). I'll probably need to add some dilated convolution layers to the model to preserve those dimensions, but I got stuck before that point.
I tried this to start with:
model = three_d_resnet_builder.build_three_d_resnet_50(input_shape= (240, 240, 240, 2),
output_shape= (240, 240, 240, 1),
output_activation='sigmoid',
regularizer='l2',
squeeze_and_excitation=False,
kernel_name='3D')
but get the exception:
TypeError: int() argument must be a string, a bytes-like object or a number, not 'tuple'
I believe it is complaining about the output_shape not being an integer when it uses it to create a Dense layer in the resnet_tail section.
Is it possible to leave the output layers without a tail?
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.