Image text masking

I need to compare two images by masking their texts, I used YOLO, OpenCV for masking texxt but it was too time consuming since I had many many images,
so does has any better approach?
My end goal is to compare two images without comparing textual data i.e masking textual data and should be faster.