erkil1452 / gaze360

Code for the Gaze360: Physically Unconstrained Gaze Estimation in the Wild Dataset
http://gaze360.csail.mit.edu
Other
225 stars 42 forks source link

Incorrect example for getting eye region in README.md #6

Closed ashesh-0 closed 4 years ago

ashesh-0 commented 4 years ago

Relevant Section

Following snippet is incorrect.

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], 
    ]
RSKothari commented 4 years ago

Thanks @ashesh-0 , I confirmed that your modification works.

erkil1452 commented 4 years ago

Thank you. I have fixed the readme.