* The account creator provides a photo id and an EIN
* You verify that the id is valid (visual/ML inspection?)
* Extract the expiration date and make sure it's unexpired (OpenCV/Tesseract)
* Extract the name from the id image (OpenCV/Tesseract)
* Check to see if that id matches the registered agent for that EIN.
This assumes that there is a unified API for EIN/TIN lookup in the US and I don't know if there is.
Honestly, the library/libraries used are kinda moot - those things change all the time (ie, it doesn't matter if it's OpenCV or something else)
Most government-issued IDs are intentionally designed to be very hard to OCR (it's why they have barcodes/etc on them for automated scanning) - and any advances in image processing are more-or-less immediately countered by improvements in ID construction
I know the E-Verify (https://e-verify.gov) service that come businesses use to process I-9 forms (https://www.uscis.gov/sites/default/files/document/forms/i-9...) electronically manages to link SSN, IDs, and other factors to ensure the person filling-out the form matches (as close as can be determined) the data they're filling-in