Loren commited on
Commit
6350480
1 Parent(s): 9c06ac7

MMCV version 1.7.0

Browse files
Files changed (2) hide show
  1. pages/App.py +3 -3
  2. requirements.txt +4 -2
pages/App.py CHANGED
@@ -496,7 +496,7 @@ def process_detect(in_image_path, _in_list_images, _in_list_readers, in_list_par
496
  return out_list_images, out_list_coordinates
497
 
498
  ###
499
- def draw_detected(in_image, in_boxes_coordinates, in_color, posit=None, in_thickness=4):
500
  """Draw boxes around detected text
501
 
502
  Args:
@@ -517,7 +517,7 @@ def draw_detected(in_image, in_boxes_coordinates, in_color, posit=None, in_thick
517
  for ind_box, box in enumerate(in_boxes_coordinates):
518
  box = np.reshape(np.array(box), [-1, 1, 2]).astype(np.int64)
519
  work_img = cv2.polylines(np.array(work_img), [box], True, in_color, in_thickness)
520
- if posit != None:
521
  if posit == 'top_left':
522
  pos = tuple(box[0][0])
523
  elif posit == 'top_right':
@@ -903,7 +903,7 @@ def highlight():
903
 
904
  ##----------- Initializations ---------------------------------------------------------------------
905
  #print("PID : ", os.getpid())
906
-
907
  st.title("OCR solutions comparator")
908
  st.markdown("##### *EasyOCR, PPOCR, MMOCR, Tesseract*")
909
  #st.markdown("#### PID : " + str(os.getpid()))
 
496
  return out_list_images, out_list_coordinates
497
 
498
  ###
499
+ def draw_detected(in_image, in_boxes_coordinates, in_color, posit='None', in_thickness=4):
500
  """Draw boxes around detected text
501
 
502
  Args:
 
517
  for ind_box, box in enumerate(in_boxes_coordinates):
518
  box = np.reshape(np.array(box), [-1, 1, 2]).astype(np.int64)
519
  work_img = cv2.polylines(np.array(work_img), [box], True, in_color, in_thickness)
520
+ if posit != 'None':
521
  if posit == 'top_left':
522
  pos = tuple(box[0][0])
523
  elif posit == 'top_right':
 
903
 
904
  ##----------- Initializations ---------------------------------------------------------------------
905
  #print("PID : ", os.getpid())
906
+ st.set_page_config(layout="wide")
907
  st.title("OCR solutions comparator")
908
  st.markdown("##### *EasyOCR, PPOCR, MMOCR, Tesseract*")
909
  #st.markdown("#### PID : " + str(os.getpid()))
requirements.txt CHANGED
@@ -2,13 +2,15 @@
2
  easyocr
3
  streamlit
4
  opencv-python-headless==4.5.5.64
 
 
5
  Pillow
 
6
  mmdet==2.25.1
7
- mmocr==0.6.1
8
  paddleocr==2.6
9
  paddlepaddle==2.3.2
10
  mycolorpy==1.5.1
11
  plotly==5.10.0
12
  plotly-express==0.4.1
13
- mmcv-full==1.6.1 --no-binary mmcv-full==1.6.1
14
  pytesseract==0.3.10
 
2
  easyocr
3
  streamlit
4
  opencv-python-headless==4.5.5.64
5
+ torch==1.12.1
6
+ torchvision==0.13.1
7
  Pillow
8
+ mmcv-full --no-binary mmcv-full
9
  mmdet==2.25.1
10
+ mmocr
11
  paddleocr==2.6
12
  paddlepaddle==2.3.2
13
  mycolorpy==1.5.1
14
  plotly==5.10.0
15
  plotly-express==0.4.1
 
16
  pytesseract==0.3.10