You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got this error in the Read from file mode. I looked up the lines but have no idea what's happening.
***LOAD AND ENCODE LABEL IMAGE VECTORS***
Traceback (most recent call last):
File "MLmicroCT.py", line 1328, in <module>
main()
File "MLmicroCT.py", line 1280, in main
rf_transverse,FL_train,FL_test,Label_train,Label_test = train_model(gridrec_stack,phaserec_stack,label_stack,localthick_stack,gridphase_train_slices_subset,gridphase_test_slices_subset,label_train_slices_subset,label_test_slices_subset)
File "MLmicroCT.py", line 709, in train_model
Label_test = LoadLabelData(ls, label_test, "transverse")
File "MLmicroCT.py", line 665, in LoadLabelData
labelimg_in_rot_sub = labelimg_in_rot[sub_slices,:,:]
IndexError: index 12 is out of bounds for axis 0 with size 12
The text was updated successfully, but these errors were encountered:
I think I got it. I indexed in a natural way of indexing and not in the python's way, i.e., 0 is the first element. Maybe it's worth adding a piece of code that detects if the index is out of bounds by 1 and if so, subtract 1 from all of the index values.
But I guess this error also means that the test and training slices should be indexed the python's way, which is not the ImageJ's way either. So two solutions: either ask for "natural" indexing (starting from 1) and then substract by 1 in python, or ask the user to input values already subtracted by 1.
Yes! I think I like your idea to detect if all label image indexes are greater than 0, and if so then subtracting 1 from each. I think it might be confusing to mentioned natural vs. python indexing in the instructions file and this solution would, in theory, account for all possible user error, right?
I got this error in the Read from file mode. I looked up the lines but have no idea what's happening.
The text was updated successfully, but these errors were encountered: