Skip to content
Snippets Groups Projects

PDF E14 analysis using DNN and a bunch of image processing hacks

Merged Javier Rojas requested to merge feature/ocr-dnn into first_round_cnn
Viewing commit 28107605
Show latest version
1 file
+ 2
2
Compare changes
  • Side-by-side
  • Inline
@@ -115,7 +115,7 @@ def save_e14(divipola, e14_info: E14Info, e14_image):
for candidate in e14_info.candidates.items():
votes = candidate[1]
try:
votes = abs(int(votes))
votes = abs(int(votes or 0))
except ValueError:
votes = 0
logger.info("[SRVDB] saving votes: {}:{}".format(candidate[0], votes))
@@ -182,7 +182,7 @@ def e14_reprocessing_img(image):
return
try:
e14_info = process_e14_pdf(e14_image.image.path)
divipola = divipola_from_url(e14_image.message_origin_url)
divipola = divipola_from_url(params.url)
save_e14(divipola,e14_info,e14_image)
except:
logger.error("[SRVE] Unexpected error in "+image,sys.exc_info()[0])