qxcv / joint-regressor

Regressing joints for fun and profit
Apache License 2.0
2 stars 3 forks source link

Reconstruction accuracy violations for negatives #1

Closed qxcv closed 8 years ago

qxcv commented 8 years ago

The check on line 288 of cy/src/detect.m, which checks that the score of a pose found through message passing matches that found through reconstruction of the pose features from type and location information, keeps triggering. This check was inherited from Yang & Ramanan's original code, although I'm pretty sure it should still be valid for my mode. I've reproduced the check below:

if wrote_ex
    w = -(qp.w + qp.w0.*qp.wreg) / qp.Cneg;
    sv_score = score(w,qp.x,qp.n);
    sv_rscore = rscore(y,x,t);
    delta = abs(sv_score - sv_rscore);
    if delta >= 1e-5
        fprintf(...
            'Delta %f = |%f (SV score) - %f (rscore)| too big\n', ...
            delta, sv_score, sv_rscore);
    end
end

The deltas reported are quite significant (i.e. of the same magnitude as the two scores).

qxcv commented 8 years ago

Possible causes I can think of (will update list as I go):

qxcv commented 8 years ago

Yup, it was probably the int square(int); problem. No assertions trigger after changing that to template<class T> T square(T); (see 2e1311b9c596244e83c8fb9ac5dfd9fbe191a4b3).