a real-world solution would be to figure out who drew those boxes and how to make them give you the coordinates properly.
this sounds like either an academic exercise, where the instructor needs to be told they’re being unreasonable, or it’s some corporate bureaucratic issue where someone mistakenly put “in charge” needs to be told they’re being unreasonable.
if you need to discuss the problem as you’ve posed it, you need to provide proper source data. that highly compressed thumbnail is impossible to experiment on.