EDTER icon indicating copy to clipboard operation
EDTER copied to clipboard

IndexError: too many indices for array: array is 3-dimensional, but 4 were indexed

Open kulkarnikeerti opened this issue 1 year ago • 3 comments

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

kulkarnikeerti avatar Mar 15 '23 10:03 kulkarnikeerti