-
Notifications
You must be signed in to change notification settings - Fork 404
Classification using resnet cannot run through cifar10 dataset #331
Comments
I am having a similar issue using resnet for classification. My input data are 2D nifti images. Any help is appreciated! Thank you, Ken. python /home/kenweber/NiftyNet-0.5.0/net_classify.py train -c SCI_Ambulation_Classification_config_training.ini Configuration File: [label] ############################## system configuration sections [NETWORK] histogram normalisationhistogram_ref_file = /home/kenweber/SCI_Ambulation_Classification/model/standardisation_models.txt [TRAINING] do_elastic_deformation = False [INFERENCE] ############################ custom configuration sections Output and Error: Number of subjects 143, input section names: ['subject_id', 'image', 'label'] INFO:niftynet: Image reader: loading 113 subjects from sections ('image',) as input [image] During handling of the above exception, another exception occurred: Traceback (most recent call last): originally defined at: originally defined at: |
Hello NiftyNet, I am just following up on this. Do you have any suggestions or other examples of how to use NiftyNet for a classification task? Thanks, Ken |
Hello.Did you solve the problem? |
I have not solved the problem. I am still waiting for a response. |
Hi kenneth, |
I am so so so excited,I have solved the problem with the help of my mentor.You just need to modify the code in the resnet.py file. Specifically, in line 109, |
I did the same in the beginning, but after all, the way to handle 3d images is different from 2d images. You can refer to my answer to solve this problem. |
Hi everyone, |
I meant activation maps in my previous question ... |
I have generate all image files as 28x28x3 .nrrd files and label files as 1x1x1 .nrrd files
There seem to be something wrong with the way I prepare the labels
Please help me if anyone knows how to fix this.
error:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 1576, in _create_c_op
c_op = c_api.TF_FinishOperation(op_desc)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Shape must be rank 2 but is rank 1 for 'worker_0/ResNet/fc/fc' (op: 'MatMul') with input shapes: [1], [1,10].
config:
[img]
csv_file = ./cifar10/model/img_partial.csv
path_to_search = ./cifar10/train_cifar10/
filename_contains = .nrrd
filename_not_contains = label_
spatial_window_size = (32, 32)
interp_order = -1
loader = simpleitk
[label]
csv_file = ./cifar10/model/label_partial.csv
path_to_search = ./cifar10/train_cifar10/
filename_contains = label_, .nrrd
spatial_window_size = (1, 1)
interp_order = -1
loader = simpleitk
############################ custom configuration sections
[CLASSIFICATION]
image = img
label = label
output_prob = False
num_classes = 10
label_normalisation = False
Please some share some demos using NiftyNet to perform Classification tasks,Thanks very much!
The text was updated successfully, but these errors were encountered: