I have a 3D PET scan (None, 128, 128, 60, 1). I want to resize it to be (None, 64, 64, 30, 1). Sometimes I need it to be even smaller. I want to do this inside a keras model. I was thinking of something like tf.image.resize but for 3D images.
How to resize a 3D image in a keras CNN model?
650 Views Asked by Alberto At
1
There are 1 best solutions below
Related Questions in TENSORFLOW
- (Tensorflow)Does the op assign change the gradient computation?
- Tensorflow Windows Accessing Folders Denied:"NewRandomAccessFile failed to Create/Open: Access is denied. ; Input/output error"
- Android App TensorFlow Google Cloud ML
- Convert Tensorflow model to Caffe model
- Google Tensorflow LSTMCell Variables Mapping to Hochreiter97_lstm.pdf paper
- additive Gaussian noise in Tensorflow
- TFlearn evaluate method results meaning
- Regularization losses Tensorflow - TRAINABLE_VARIABLES to Tensor Array
- feed picture to model tensorflow for training
- Fail to read the new format of tensorflow checkpoint?
- I got a error when running a github project in tensorflow
- Tensorflow R0.12 softmax_cross_entropy_with_logits ASSERT Error
- RuntimeError in run_one_batch of TensorFlowDataFrame in tensorflow
- Same output in neural network for each input after training
- ConvNet : Validation Loss not strongly decreasing but accuracy is improving
Related Questions in KERAS
- Intermediate layer in keras to fetch the weights, convert and feed to the network
- Updating Shared Variables in Keras
- Import theano gives the AttributeError: module 'theano' has no attribute 'gof'
- How to Implement "Multidirectional" LSTMs?
- Error in running keras for deep learning in ubuntu 14.04
- Issue with setting TensorFlow as the session in Keras
- Multiple outputs in Keras gives value error
- Strange behavior of a frozen inceptionV3 net in Keras
- Tensorflow Image Shape Error
- Rounding Error at a python neural network made by Keras
- K fold cross validation using keras
- Keras Binary Classifier Model.Predict() class association?
- How to predict a layer's weights using another model in an end to end fashion?
- CNN model why the data is too large?
- Keras How to use max_value in Relu activation function
Related Questions in CONV-NEURAL-NETWORK
- Using Convolution Neural Net with Lasagne in Python error
- How to prepare data for torch7 deep learning convolutional neural network example?
- additive Gaussian noise in Tensorflow
- Same output in neural network for each input after training
- ConvNet : Validation Loss not strongly decreasing but accuracy is improving
- Tensor flow affecting multiprocessing/threading
- Inceptionv3 Transfer Learning on Torch
- Transfer weights from caffe to tensorflew
- Lasagne NN strange behavior with accuracy and weight convergence
- Multiple outputs in Keras gives value error
- How to use feature maps of CNN to localize obect on the image?
- Why Validation Error Rate remain same value?
- How to create LMDB files for semantic segmentation?
- Training model to recognize one specific object (or scene)
- Restoring saved TensorFlow model to evaluate on test set
Related Questions in RESIZE
- How to resize images with PHP PARSE SDK
- Problems with Clickable Divs in side bar
- Resizing images failing on start, setContentView & bitmap factory[android]
- HTML, CSS | Page Blurs on resize
- A view that can be moved and resized on android
- Creating a vertically draggable container in Adobe Flex 3.5
- Resize <iframe> so that whole content just scales down or up
- How to resize a flexible text-area on a mobile device?
- Why is my array of struct not resizing with Array.Resize?
- Resize image to the size of JLabel taken dynamically from file chooser in Swing app
- Best way to resize top banner images (viewport/html)
- Python Resize Multiple images ask user to continue
- Resize flexlslider at the end of window resize
- Resize a UITableView
- Error on running "adb shell wm density 240" for changing Android device density
Related Questions in BATCHSIZE
- Change batch size using a list of Pytorch's data loader
- How to specify the batch_size in PyTorch Sequantial model?
- Number of batches and epoch
- LSTM with changing batch size while training
- Network stops learning once batchsize is set to > 1
- How to resize a 3D image in a keras CNN model?
- how to overfit a model on a single batch in keras?
- SDG with batch size >1?
- RuntimeError: Given groups=1, weight of size [64, 3, 3, 3], expected input[64, 1, 32, 32] to have 3 channels, but got 1 channels instead
- What is the difference between "batch size in tf.keras.preprocessing.timeseries_dataset_from_array" and "batch size in model.fit"?
- TensorFlow's Mirrored strategy, batch size and Back Propagation
- Is there a way to change the Batchsize of MongoDB permanently?
- what is the max numbers of inputs for `keras.model(input)` instead of `keras.model.predict(input)`
- How to create Tensorflow dataset batches for variable shape inputs?
- Controlling Ansible playbook execution
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
We can remove the last dimension of the 3D image
( None , 128 , 128 , 60 , 1)so that the shape of the transformed tensor is( None , 128 , 128 , 60 )that matches with the required shape fortf.imagewhich is( height , width , channels ). ( Note: the required shape can also be( batch_size , height, width, num_channels ))We will use
tf.squeezefor this purpose.The output
To restore the deleted dimension of size
1, you may usetf.expand_dims,The output,