u-net-brain-tumor | U-Net Brain Tumor Segmentation | Machine Learning library
kandi X-RAY | u-net-brain-tumor Summary
kandi X-RAY | u-net-brain-tumor Summary
Note that according to the license, user have to apply the dataset from BRAST, please do NOT contact me for the dataset. Many thanks. The prepare_data_with_valid.py split the training set into 2 folds for training and validating. By default, it will use only half of the data for the sake of training speed, if you want to use all data, just change DATA_SIZE = 'half' to all.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load training and validation set .
- U_net layer .
- Unet layer .
- Distortion images
- Wrapper for visimages2 .
- Saves images to images
u-net-brain-tumor Key Features
u-net-brain-tumor Examples and Code Snippets
Community Discussions
Trending Discussions on u-net-brain-tumor
QUESTION
I am trying to segment images from the BRATS challenge. I am using U-net in a combination of these two repositories:
https://github.com/zsdonghao/u-net-brain-tumor
https://github.com/jakeret/tf_unet
When I try to output the prediction statistics a mismatch shape error come up:
InvalidArgumentError: Input to reshape is a tensor with 28800000 values, but the requested shape has 57600 [[Node: Reshape_2 = Reshape[T=DT_FLOAT, Tshape=DT_INT32, _device="/job:localhost/replica:0/task:0/device:CPU:0"](_arg_Cast_0_0, Reshape_2/shape)]]
I am using image slices 240x240, with a batch_verification_size = 500
Then,
- this is shape test_x: (500, 240, 240, 1)
- this is shape test_y: (500, 240, 240, 1)
- this is shape test x: (500, 240, 240, 1)
- this is shape test y: (500, 240, 240, 1)
- this is shape batch x: (500, 240, 240, 1)
- this is shape batch y: (500, 240, 240, 1)
- this is shape prediction: (500, 240, 240, 1)
- this is cost : Tensor("add_88:0", shape=(), dtype=float32)
- this is cost : Tensor("Mean_2:0",shape=(), dtype=float32)
- this is shape prediction: (?, ?, ?, 1)
- this is shape batch x: (500, 240, 240, 1)
- this is shape batch y: (500, 240, 240, 1)
240 x 240 x 500 = 28800000 I don't know why is requesting 57600
It looks like the error is emerging from output_minibatch_stats
function:
ANSWER
Answered 2018-May-27 at 18:23You set your batch size as 1 in your tensorflow pipeline during training but feeding in 500 batch size in your testing data. Thats why the network requests only a tensor of shape 57600. You can either set your training batch size 500 or testing batch size as 1.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install u-net-brain-tumor
You can use u-net-brain-tumor like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page