Solved by Yuerno in post #5 
              
              
                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, s…