MarceloCC commited on
Commit
cfa6e00
1 Parent(s): 8cfdea0

Update script.py

Browse files
Files changed (1) hide show
  1. script.py +8 -3
script.py CHANGED
@@ -1,8 +1,13 @@
1
  import pickle
2
  import numpy as np
3
  import pandas as pd
 
 
4
 
5
- predict = [1,2,3,4]
 
 
6
 
7
- df = pd.DataFrame([(f"testid{i:04}", v) for i, v in enumerate(predict)], columns=["id", "pred"])
8
- df.to_csv("submission.csv", index=None)
 
 
1
  import pickle
2
  import numpy as np
3
  import pandas as pd
4
+ import cv2
5
+ from PIL import Image
6
 
7
+ #predict = [1,2,3,4]
8
+ #df = pd.DataFrame([(f"testid{i:04}", v) for i, v in enumerate(predict)], columns=["id", "pred"])
9
+ #df.to_csv("submission.csv", index=None)
10
 
11
+ data = np.random.randint(0, 255, size=(900, 800, 3), dtype=np.uint8)
12
+ img = Image.fromarray(data, 'RGB')
13
+ img.save('patch.png')