eyeBBInCrop = [
eyeBBInFull[0] - headBBInFull[0], # subtract offset of the crop
eyeBBInFull[1] - headBBInFull[1],
eyeBBInFull[2] / headBBInFull[2], # scale to smaller space of the crop
eyeBBInFull[3] / headBBInFull[3],
]
Correct snippet should be
eyeBBInCrop = [
(eyeBBInFull[0] - headBBInFull[0])/headBBInFull[2], # subtract offset of the crop
(eyeBBInFull[1] - headBBInFull[1])/headBBInFull[3],
eyeBBInFull[2] / headBBInFull[2], # scale to smaller space of the crop
eyeBBInFull[3] / headBBInFull[3],
]
Relevant Section
Following snippet is incorrect.
Correct snippet should be