How to compute the IOU between two images "frame" and "templateimgw"

Thanks for the error message. It seems to be a double post from here so lets keep the discussion in the other thread.