Giter VIP home page Giter VIP logo

ocr_evaluation's Introduction

MODIFIED BY ICDAR CODES INSTRUCTIONS FOR THE STANDALONE SCRIPTS

HOW TO USE

Requirements:

  • Python version 2.7.
  • Each Task requires different Python modules. When running the script, if some module is not installed you will see a notification and installation instructions.

Procedure: Download the ZIP file for the requested script and unzip it to a directory.

Open a terminal in the directory and run the command:

python script.py –g gt.zip –s submit.zip -p '{"LTRB":true,"E2E":true}'

Pycharm IDE use parameters

-g gt.zip -s submit.zip -p {\"LTRB\":true,\"E2E\":true}

If you have already installed all the required modules, then you will see the method’s results or an error message if the submitted file is not correct.

parameters:

-g: Path of the Ground Truth file. In most cases, the Ground Truth will be included in the same Zip file named 'gt.zip', gt.txt' or 'gt.json'. If not, you will be able to get it on the Downloads page of the Task.

-s: Path of your method's results file.

Optional parameters:

-o: Path to a directory where to copy the file ‘results.zip’ that contains per-sample results.

-p: JSON string parameters to override the script default parameters. The parameters that can be overrided are inside the function 'default_evaluation_params' located at the begining of the evaluation Script.

when use Algorithm_IOU -p
'IOU_CONSTRAINT': 0.5,
'AREA_PRECISION_CONSTRAINT': 0.5,
'GT_SAMPLE_NAME_2_ID': 'gt_img_([0-9]+).txt',
'DET_SAMPLE_NAME_2_ID': 'res_img_([0-9]+).txt',
'LTRB': False,  # LTRB:2points(left,top,right,bottom) or 4 points(x1,y1,x2,y2,x3,y3,x4,y4)
'CRLF': False,  # Lines are delimited by Windows CRLF format
'CONFIDENCES': False,  # Detections must include confidence value. AP will be calculated
'PER_SAMPLE_RESULTS': True,  # Generate per sample results and produce data for visualization
'E2E': False   #compute average edit distance for end to end evaluation
when use Algorithm_DetEva -p
'AREA_RECALL_CONSTRAINT': 0.8,
'AREA_PRECISION_CONSTRAINT': 0.4,
'EV_PARAM_IND_CENTER_DIFF_THR': 1,
'MTYPE_OO_O': 1.,
'MTYPE_OM_O': 0.8,
'MTYPE_OM_M': 1.,
'GT_SAMPLE_NAME_2_ID': 'gt_img_([0-9]+).txt',
'DET_SAMPLE_NAME_2_ID': 'res_img_([0-9]+).txt',
'CRLF': False  # Lines are delimited by Windows CRLF format

-c: choose algorithm for differet tasks.(Challenges 1、2 use 'DetEva' Challenges 4 use 'IoU', default 'IoU')

Example: python script.py –g gt.zip –s submit.zip –o ./ -p '{"CRLF":true}' -c DetEva

THEORY

see my blog

If this repository helps you,please star it. Thanks.

ocr_evaluation's People

Contributors

liuheng92 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.