Check if object is in viewport

Hi,
is there a way to check if an object is being currently rendered by a viewport?
something like viewport.isObjectInside(prim) or similar?

Essentially, given a viewport and/or a camera (either ROSCameraBridge or camera itself) and an object prim I want to check if this object is being rendered currently by that camera.

Surely, I could hide that object, and check for differences between the frames (for example using segmentation) or give a different segmentation/instance class for each object in the scene.

Best,
Elia