FWPM: Deep Learning for Image Classification and Segmentation