presidio icon indicating copy to clipboard operation
presidio copied to clipboard

Returned verification image is empty if no text is detected

Open niwilso opened this issue 2 years ago • 0 comments

Describe the bug When calling .verify_dicom_instance using the DicomImagePiiVerifyEngine, the returned verification image is empty when no PII text is detected.

To Reproduce Steps to reproduce the behavior:

  1. Open a Python notebook
  2. Load a DICOM file that does not have text PII burnt-in (instance = pydicom.dcmread(YOUR_DCM_FILE_PATH_HERE))
  3. Run the following code:
engine = DicomImagePiiVerifyEngine()
verify_image, ocr_results, analyzer_results = engine.verify_dicom_instance(instance, display_image=True)
  1. You should now see an empty image displayed

Expected behavior The correct behavior we expect would be for the image to still display, but just without any bounding boxes since there is no text that can be picked up as PII.

Screenshots Example of the bug:

image

niwilso avatar Feb 16 '23 17:02 niwilso