Spaces:
Build error
Build error
First model version
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import os
|
2 |
os.system('pip install --upgrade --no-cache-dir gdown')
|
3 |
-
os.system('gdown -O ./output/ctw/ 1nhT7yuqJ8V8vfoJdI0Qn6notmoLFRrmm')
|
4 |
os.system('pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"')
|
5 |
os.system('python setup.py build develop --user')
|
6 |
#os.system('pip install git+https://github.com/Cyril-Sterling/ContourNet')
|
@@ -24,7 +24,6 @@ def infer(filepath):
|
|
24 |
output_polygon=True
|
25 |
)
|
26 |
image = cv2.imread(filepath)
|
27 |
-
print(image.shape)
|
28 |
result_polygons, result_masks = text_demo.run_on_opencv_image(image)
|
29 |
image = text_demo.visualization(image, result_polygons, result_masks)
|
30 |
cv2.imwrite('result.jpg', image)
|
|
|
1 |
import os
|
2 |
os.system('pip install --upgrade --no-cache-dir gdown')
|
3 |
+
os.system('gdown -O ./output/ctw/model_ctw.pth 1nhT7yuqJ8V8vfoJdI0Qn6notmoLFRrmm')
|
4 |
os.system('pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"')
|
5 |
os.system('python setup.py build develop --user')
|
6 |
#os.system('pip install git+https://github.com/Cyril-Sterling/ContourNet')
|
|
|
24 |
output_polygon=True
|
25 |
)
|
26 |
image = cv2.imread(filepath)
|
|
|
27 |
result_polygons, result_masks = text_demo.run_on_opencv_image(image)
|
28 |
image = text_demo.visualization(image, result_polygons, result_masks)
|
29 |
cv2.imwrite('result.jpg', image)
|