import pickle import numpy as np import pandas as pd from PIL import Image #predict = [1,2,3,4] #df = pd.DataFrame([(f"testid{i:04}", v) for i, v in enumerate(predict)], columns=["id", "pred"]) #df.to_csv("submission.csv", index=None) data = np.random.randint(0, 255, size=(900, 800, 3), dtype=np.uint8) img = Image.fromarray(data, 'RGB') img.save('patch.png')