forked from JiaquanYe/TableMASTER-mmocr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_table_inference.py
30 lines (27 loc) · 1.89 KB
/
run_table_inference.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
import sys
import time
import subprocess
if __name__ == "__main__":
# detection
subprocess.call("CUDA_VISIBLE_DEVICES=0 python -u ./table_recognition/table_inference.py 8 0 0 &"
"CUDA_VISIBLE_DEVICES=1 python -u ./table_recognition/table_inference.py 8 1 0 &"
"CUDA_VISIBLE_DEVICES=2 python -u ./table_recognition/table_inference.py 8 2 0 &"
"CUDA_VISIBLE_DEVICES=3 python -u ./table_recognition/table_inference.py 8 3 0 &"
"CUDA_VISIBLE_DEVICES=4 python -u ./table_recognition/table_inference.py 8 4 0 &"
"CUDA_VISIBLE_DEVICES=5 python -u ./table_recognition/table_inference.py 8 5 0 &"
"CUDA_VISIBLE_DEVICES=6 python -u ./table_recognition/table_inference.py 8 6 0 &"
"CUDA_VISIBLE_DEVICES=7 python -u ./table_recognition/table_inference.py 8 7 0", shell=True)
time.sleep(60)
# structure
subprocess.call("CUDA_VISIBLE_DEVICES=0 python -u ./table_recognition/table_inference.py 8 0 2 &"
"CUDA_VISIBLE_DEVICES=1 python -u ./table_recognition/table_inference.py 8 1 2 &"
"CUDA_VISIBLE_DEVICES=2 python -u ./table_recognition/table_inference.py 8 2 2 &"
"CUDA_VISIBLE_DEVICES=3 python -u ./table_recognition/table_inference.py 8 3 2 &"
"CUDA_VISIBLE_DEVICES=4 python -u ./table_recognition/table_inference.py 8 4 2 &"
"CUDA_VISIBLE_DEVICES=5 python -u ./table_recognition/table_inference.py 8 5 2 &"
"CUDA_VISIBLE_DEVICES=6 python -u ./table_recognition/table_inference.py 8 6 2 &"
"CUDA_VISIBLE_DEVICES=7 python -u ./table_recognition/table_inference.py 8 7 2", shell=True)
time.sleep(60)
# recognition
subprocess.call("CUDA_VISIBLE_DEVICES=0 python -u ./table_recognition/table_inference.py 8 1 1", shell=True)