方法一:降低batchsize
方法二:将opencv库改成PIL
How to train segmentation model with large dataset? · Issue #1775 · open-mmlab/mmsegmentation (github.com)