Page cover image

Missing Value Test

The Missing Values Test enables you to identify data points with missing bounding boxes. Use filters to filter by class or by test results to directly look at data points of interest.

Execute Test:

The code snippet provided outlines the process of setting up and executing a Missing Value Test in RagaAI, focusing on detecting data points where text detection and recognition have been missed.

Step 1: Define the Outlier Detection Rules

Begin by establishing the criteria for detecting missing values in your dataset.

rules = OcrRules()
rules.add(expected_detection={"invoice_date": 1,"total_gross_worth": 1})


ocr_test = ocr_missing_test_analysis(test_session=test_session,
                             dataset_name = "Invoices_Test",
                             test_name = "OCR Missing Value Test",
                             model = "dbnet",
                             type = "ocr",
                             output_type="missing_value",
                             rules = rules)

test_session.add(ocr_test)

test_session.run()
  • OCRRules(): Initialises the rules for missing value detection for OCR Usecases.

    • rules.add(): Adds a rule for detecting missed values:

      • expected_detection: Sets the expected classes to be present in each datapoint.

  • ocr_missing_test_analysis(): Configures the missing value test with the following parameters:

    • test_session: The session object tied to your RagaAI project.

    • dataset_name: The name of the dataset you are analysing, "Invoices_Test" here.

    • test_name: A name for the test, "OCR Missing Value Test" in this case.

    • model: Specifies the OCR model used for inferences, "dbnet" here.

    • type: Specify the usecase, "ocr" here.

    • output_type: For OCR use cases use output_type = "missing value".

    • rules: The previously defined rules for missing value detection.

  • test_session.add(): Registers the outlier detection test within the session.

  • test_session.run(): Starts the execution of all tests in the session, including the outlier detection test.

By completing these steps, you have initiated a Missing Value Test for OCR application on the RagaAI Testing Platform.

After the test, carefully review the identified missing values and do a root cause analysis to take remedial actions.

Analysing Test Results

Test Overview

  • Pie Chart: Provides an overview of the test results using a pie chart compares the percentage of Bbox of classes accurately detected in a dataset according to the expected values set by the user

Failed Cases Per Class

  • Bar Graph: This helps users visualise the count of missing values per class.

Assessing and Visualising Data

  • Datagrid View: Examine images in the grid view. View datapoints where detections are being missed and drill down to gain more insights.

Interpreting Results

  • Expected values: Number of expected bounding boxes of a class in a datapoint. This information is set by the user while executing the test

  • Actual: Number of bounding boxes detected of a class in a datapoint.

By adhering to these steps, you can effectively utilise RagaAI to detect and analyse datapoints where detections are being missed in your OCR datasets.

Last updated