It gives negatives in [dy, edy, dx, edx, y, ey, x, ex, tmpw, tmph].
It seems like your conversion from matlab indexing to python indexing is wrong somewhere. I advise you to not do the conversion in the middle. You should follow the matlab code and only converts it to python indexing at the very end since the code is trained in matlab.
It gives negatives in [dy, edy, dx, edx, y, ey, x, ex, tmpw, tmph].
It seems like your conversion from matlab indexing to python indexing is wrong somewhere. I advise you to not do the conversion in the middle. You should follow the matlab code and only converts it to python indexing at the very end since the code is trained in matlab.