presidio
presidio copied to clipboard
Combine redactor engines with verification engines
Is your feature request related to a problem? Please describe.
Currently, image redaction and image PII verification operate under two separate classes in the presidio-image-redactor
module. Having two separate imports to work on the same data type is inconvenient and may not be the preferred structure when taking future improvements in mind.
Describe the solution you'd like Have a base class for image analysis and redaction, and an inheriting class for dicom image analysis and redaction. Each class would initially have three required public methods:
-
redact: Redact text PII from provided image (same as from
ImageRedactorEngine
) -
validate: Return the verification image with entity label and bounding boxes (same as from
ImagePiiVerifyEngine
) - analyze: Return the bounding boxes with their text analysis results.
This would facilitate further debugging, and can also plug into improvements in the demo website that Sharon is currently working on (in future releases).
Additionally, it would also be great to have "evaluate" as one of the required public methods (already exists for the DICOM engines but would need to be added for the standard image engine).
Describe alternatives you've considered We can keep our current structure of having the redactor and verifiers separate, but that may not be conducive to supporting further customization and analysis.
Additional context This requires discussion to better understand the pros and cons, as well as the specific requirements around the design, keeping future enhancements in mind.