Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -80,7 +80,11 @@ def workflow(img, img_ofa_out):
|
|
| 80 |
#Paste resized LAMA image on top of original image at correct cordinates
|
| 81 |
print(">>>Pasting LAMA image on original image at desired cordinates")
|
| 82 |
#img = cv2.imread(img) #getting TypeError: Can't convert object to 'str' for 'filename'
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
x, y = zipped[0][0], zipped[0][1]
|
| 85 |
img[y: y + height, x: x + width] = img_lama_resize
|
| 86 |
#cv2_imshow(im_orig)
|
|
|
|
| 80 |
#Paste resized LAMA image on top of original image at correct cordinates
|
| 81 |
print(">>>Pasting LAMA image on original image at desired cordinates")
|
| 82 |
#img = cv2.imread(img) #getting TypeError: Can't convert object to 'str' for 'filename'
|
| 83 |
+
|
| 84 |
+
#converting to cv2 image
|
| 85 |
+
#img = np.array(img)
|
| 86 |
+
img.save('temp.jpg')
|
| 87 |
+
img = cv2.imread("temp.jpg")
|
| 88 |
x, y = zipped[0][0], zipped[0][1]
|
| 89 |
img[y: y + height, x: x + width] = img_lama_resize
|
| 90 |
#cv2_imshow(im_orig)
|