EDTER
EDTER copied to clipboard
IndexError: too many indices for array: array is 3-dimensional, but 4 were indexed
Hi @MengyangPu
Sorry to disturb you again with these many questions. I have encountered another error during testing. Error is as below:
Traceback (most recent call last):
File "./tools/test.py", line 142, in <module>
main()
File "./tools/test.py", line 129, in main
outputs = single_gpu_test(model, data_loader, args.show, args.show_dir)
File "/home/keerti/PycharmProjects/EDTER-main/mmseg/apis/test.py", line 67, in single_gpu_test
out_file=out_file)
File "/home/keerti/PycharmProjects/EDTER-main/mmseg/models/segmentors/base.py", line 259, in show_result
color_seg[seg == label, :] = color
IndexError: too many indices for array: array is 3-dimensional, but 4 were indexed
Could you please help me what might be the reason for this error? PS: I have not changed any of the code. I am just trying to test the model
@MengyangPu, I tried to get the shapes of the variables involved here. color_seg.shape = (1, 321, 3) seg.shape = (1, 321, 481) label = 0 color = [0, 0, 0]
Do you think the output values here are causing the error?
@MengyangPu, I tried to get the shapes of the variables involved here. color_seg.shape = (1, 321, 3) seg.shape = (1, 321, 481) label = 0 color = [0, 0, 0]
Do you think the output values here are causing the error?
did you finish testing? i cannot address this problem