CNN based features extraction for age estimation and gender classification