Spaces:
Sleeping
Sleeping
Mountchicken
commited on
Commit
•
79d74f9
1
Parent(s):
b395996
Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,6 @@ os.system('python -m mim install "mmcv==2.0.0rc4"')
|
|
6 |
os.system('python -m mim install mmengine')
|
7 |
os.system('python -m mim install "mmdet>=3.0.0rc5"')
|
8 |
|
9 |
-
# Download checkpoints
|
10 |
-
os.system(
|
11 |
-
'wget https://download.openmmlab.com/mmocr/textdet/dbnetpp/dbnetpp_resnet50-oclip_fpnc_1200e_icdar2015/dbnetpp_resnet50-oclip_fpnc_1200e_icdar2015_20221101_124139-4ecb39ac.pth -O mmocr-dev-1.x/dbnetpp.pth' # noqa
|
12 |
-
)
|
13 |
-
os.system(
|
14 |
-
'wget https://github.com/Mountchicken/Union14M/releases/download/Checkpoint/maerec_b_union14m.pth -O mmocr-dev-1.x/maerec_b_union14m.pth'
|
15 |
-
)
|
16 |
|
17 |
import cv2
|
18 |
import argparse
|
@@ -36,7 +29,7 @@ def arg_parse():
|
|
36 |
'--rec_weight',
|
37 |
type=str,
|
38 |
default=
|
39 |
-
'
|
40 |
help='The recognition weight file.')
|
41 |
parser.add_argument(
|
42 |
'--det_config',
|
@@ -47,7 +40,7 @@ def arg_parse():
|
|
47 |
parser.add_argument(
|
48 |
'--det_weight',
|
49 |
type=str,
|
50 |
-
default='
|
51 |
help='The detection weight file.')
|
52 |
parser.add_argument(
|
53 |
'--device',
|
|
|
6 |
os.system('python -m mim install mmengine')
|
7 |
os.system('python -m mim install "mmdet>=3.0.0rc5"')
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
import cv2
|
11 |
import argparse
|
|
|
29 |
'--rec_weight',
|
30 |
type=str,
|
31 |
default=
|
32 |
+
'maerec_b_union14m.pth',
|
33 |
help='The recognition weight file.')
|
34 |
parser.add_argument(
|
35 |
'--det_config',
|
|
|
40 |
parser.add_argument(
|
41 |
'--det_weight',
|
42 |
type=str,
|
43 |
+
default='dbnetpp.pth',
|
44 |
help='The detection weight file.')
|
45 |
parser.add_argument(
|
46 |
'--device',
|