Detecting an object outside a bounding-box

hi ,
I need to detect if an object is outside of a specific box (yellow box) or not .
the type of the object does not matter to me at all ( only the existence of the object matters)