Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import cv2
|
2 |
+
from PIL import Image
|
3 |
+
|
4 |
+
img = "https://farm5.staticflickr.com/4139/4887614566_6b57ec4422_z.jpg"
|
5 |
+
output = model(img)
|
6 |
+
pred = output[0].plot()
|
7 |
+
pred = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
8 |
+
pred = Image.fromarray(pred)
|
9 |
+
pred
|