Found my issue! My code had me generating a list of file paths for the raw image files as well as the masks, and I forgot that file ordering is different on Windows vs. Linux when using something like os.listdir(). On Windows, the file orderings for both the raw images and the masks were the same, so I was able to match the images to masks correctly for processing, but on Linux, the raw images had a different file order than the masks, which meant that the wrong masks were being matched with the wrong raw images, causing the issue of no training.