Spaces:
Running
Running
vincentlui
commited on
Commit
•
6639f73
1
Parent(s):
d417a7f
add albumentation library
Browse files- app.py +3 -2
- requirements.txt +2 -1
app.py
CHANGED
@@ -15,7 +15,8 @@ except:
|
|
15 |
try:
|
16 |
from bridge_hand_detect2.predict import CardDetectionModel
|
17 |
from bridge_hand_detect2.pbn import create_pbn_file
|
18 |
-
except:
|
|
|
19 |
from bridge_hand_detect.predict import CardDetectionModel
|
20 |
from bridge_hand_detect.pbn import create_pbn_file
|
21 |
|
@@ -36,7 +37,7 @@ def predict(image_path):
|
|
36 |
start = timer()
|
37 |
df = None
|
38 |
try:
|
39 |
-
hands, (width,height) = model(image_path)
|
40 |
print(hands)
|
41 |
# Output dataframe
|
42 |
df = pd.DataFrame(['♠', '♥', '♦', '♣'], columns=[''])
|
|
|
15 |
try:
|
16 |
from bridge_hand_detect2.predict import CardDetectionModel
|
17 |
from bridge_hand_detect2.pbn import create_pbn_file
|
18 |
+
except Exception as e:
|
19 |
+
print(e)
|
20 |
from bridge_hand_detect.predict import CardDetectionModel
|
21 |
from bridge_hand_detect.pbn import create_pbn_file
|
22 |
|
|
|
37 |
start = timer()
|
38 |
df = None
|
39 |
try:
|
40 |
+
hands, (width,height) = model(image_path, augment=True)
|
41 |
print(hands)
|
42 |
# Output dataframe
|
43 |
df = pd.DataFrame(['♠', '♥', '♦', '♣'], columns=[''])
|
requirements.txt
CHANGED
@@ -3,4 +3,5 @@ onnx
|
|
3 |
onnxruntime
|
4 |
lap
|
5 |
opencv-python
|
6 |
-
openvino==2024.0.0
|
|
|
|
3 |
onnxruntime
|
4 |
lap
|
5 |
opencv-python
|
6 |
+
openvino==2024.0.0
|
7 |
+
albumentations
|