Streamer / Twitch Recognition


(Star on face for anonymity of user)
Hi, I’ve tried a couple things to detect streamer’s picture in picture rectangles on things like zoom screenshares or twitch streams, I’ve done everything that gpt recommended like basic contour detection and applying some transformations to the image beforehand, but I’m never able to get a > 10% success rate of identifying the “rectangle” with the streamer within it. False positives aren’t too much of an issue since I can do a quick face detect within detected rectangles

I’ve also tried some github repos like GitHub - shibatch/rectdetect: Realtime rectangle detector with GPGPU and GitHub - AlaaAnani/Hough-Rectangle-and-Circle-Detection: This Python project coded using Numpy implements line, rectangle and circle Hough Transform. It takes an image, determines the lines, rectangles and circles in it and also counts the money in the photo. [Calibrated on the provided test set only].
None seem to do the job too well. The closest I could get is using YOLO-World v8 - XL and using the prompt “picture in picture”, which gets me an alright success rate but not above 90%

Maybe I’m missing a solution with opencv?