Human detection and action recognition based on CNN using optical flow