根据报错提示:AssertionError: Labels must be in consecutive order (0, 1, 2, ...). The labels [10 2] do not satisfy this restriction.
找到对于文件位置(./nnunet/preprocessing/sanity_checks.py):
报错原因:line169是对datsset.json里的['labels]读取的键值进行读取,也就是labels的个数,但并没有按序排列,导致在lin173用np.ediff1d进行labels差值检查时报错,所以只需要用sorted对list进行排序即可: