luoyetx / JDA

C++ implementation of Joint Cascade Face Detection and Alignment.
BSD 3-Clause "New" or "Revised" License
184 stars 140 forks source link

Possible future enhancement NPD #11

Open inspirit opened 8 years ago

inspirit commented 8 years ago

i think you can try to use recently introduced Normalised Pixel Difference features instead of existing. You can read more here: http://www.cbsr.ia.ac.cn/users/scliao/papers/Liao-PAMI15-NPD.pdf I'm currently doing some tests using NPD for facial landmarks alignment and it clearly outperforms classical pixel difference features.

luoyetx commented 8 years ago

Thanks a lot!

prayshe commented 8 years ago

@inspirit Hi, I'm studying face alignment now. I have replaced conventional pixel difference by normalized pixel difference. However, it seems that NPD made no contribution to accuracy. Is there any part I need to modify to match the new feature? Thanks!

inspirit commented 8 years ago

this is not that easy as just using NPD instead of pixel diffs. you should take into account that response values will be different so you should select threshold more careful. please refer to the paper i mentioned above

prayshe commented 8 years ago

Actually, I have selected threshold from -0.25 to 0.25 when using NPD, while -64 to 64 when using PD. But I made no improvement. Anyway, thanks!

inspirit commented 8 years ago

in my implementation i'm generating random splits with 2 thresholds one negative and one positive. threshold values are in range -127 to 127. so for each split i try 10 random thresholds * 30 random pixel positions, and then select the one that reduce the error better than others. the split check against 2 thresholds is:

const float npd = response(feature_responses);
// thresh1 is negative, thresh2 is positive in [0,127) range
return npd < thresh1 || npd > thresh2;
prayshe commented 8 years ago

Thank you very much, I have read the paper. Originally I thought that double thresholds were only used in duadratic tree. Now I figure it out. Thanks!

lieff commented 6 years ago

I have some questions too..: const float npd = response(feature_responses); Do you used response (f1-f2)/ (f1+f2) or more complicated function?

// thresh1 is negative, thresh2 is positive in [0,127) range return npd < thresh1 || npd > thresh2; What scale is used for npd weighing?