Update app_pages/ocr_comparator.py
Browse files
app_pages/ocr_comparator.py
CHANGED
|
@@ -498,7 +498,7 @@ def app():
|
|
| 498 |
with st.spinner('Tesseract Text detection in progress ...'):
|
| 499 |
tesserocr_boxes_coordinates, tesserocr_status = tesserocr_detect(in_image_path, \
|
| 500 |
_in_list_images[0], \
|
| 501 |
-
in_list_params[3]
|
| 502 |
# Visualization
|
| 503 |
if tesserocr_status == 'OK':
|
| 504 |
tesserocr_image_detect = draw_detected(_in_list_images[0],tesserocr_boxes_coordinates,\
|
|
@@ -620,7 +620,8 @@ def app():
|
|
| 620 |
# Recognize with Tesseract
|
| 621 |
with st.spinner('Tesseract Text recognition in progress ...'):
|
| 622 |
out_df_results_tesseract, status_tesseract = \
|
| 623 |
-
tesserocr_recog(in_image_cv, in_list_dict_params[3], len(list_cropped_images))
|
|
|
|
| 624 |
##
|
| 625 |
|
| 626 |
# Create results data frame
|
|
@@ -978,8 +979,10 @@ def app():
|
|
| 978 |
ppocr_lang = list_dict_lang[1][ppocr_key_lang]
|
| 979 |
#mmocr_key_lang = lang_col[2].selectbox(reader_type_list[2]+" :", list_dict_lang[2].keys(), 0)
|
| 980 |
#mmocr_lang = list_dict_lang[2][mmocr_key_lang]
|
| 981 |
-
tesserocr_key_lang = lang_col[3].selectbox(reader_type_list[3]+" :", list_dict_lang[3].keys(), 35)
|
| 982 |
-
tesserocr_lang = list_dict_lang[3][tesserocr_key_lang]
|
|
|
|
|
|
|
| 983 |
|
| 984 |
st.markdown("#### Choose picture:")
|
| 985 |
cols_pict = st.columns([1, 2])
|
|
|
|
| 498 |
with st.spinner('Tesseract Text detection in progress ...'):
|
| 499 |
tesserocr_boxes_coordinates, tesserocr_status = tesserocr_detect(in_image_path, \
|
| 500 |
_in_list_images[0], \
|
| 501 |
+
in_list_params[2]) #in_list_params[3]
|
| 502 |
# Visualization
|
| 503 |
if tesserocr_status == 'OK':
|
| 504 |
tesserocr_image_detect = draw_detected(_in_list_images[0],tesserocr_boxes_coordinates,\
|
|
|
|
| 620 |
# Recognize with Tesseract
|
| 621 |
with st.spinner('Tesseract Text recognition in progress ...'):
|
| 622 |
out_df_results_tesseract, status_tesseract = \
|
| 623 |
+
#tesserocr_recog(in_image_cv, in_list_dict_params[3], len(list_cropped_images))
|
| 624 |
+
tesserocr_recog(in_image_cv, in_list_dict_params[2], len(list_cropped_images))
|
| 625 |
##
|
| 626 |
|
| 627 |
# Create results data frame
|
|
|
|
| 979 |
ppocr_lang = list_dict_lang[1][ppocr_key_lang]
|
| 980 |
#mmocr_key_lang = lang_col[2].selectbox(reader_type_list[2]+" :", list_dict_lang[2].keys(), 0)
|
| 981 |
#mmocr_lang = list_dict_lang[2][mmocr_key_lang]
|
| 982 |
+
#tesserocr_key_lang = lang_col[3].selectbox(reader_type_list[3]+" :", list_dict_lang[3].keys(), 35)
|
| 983 |
+
#tesserocr_lang = list_dict_lang[3][tesserocr_key_lang]
|
| 984 |
+
tesserocr_key_lang = lang_col[2].selectbox(reader_type_list[2]+" :", list_dict_lang[2].keys(), 35)
|
| 985 |
+
tesserocr_lang = list_dict_lang[2][tesserocr_key_lang]
|
| 986 |
|
| 987 |
st.markdown("#### Choose picture:")
|
| 988 |
cols_pict = st.columns([1, 2])
|