Have implement neural network based mask detection algorithm with different colors of masks and that is working with 99% accuracy (around 2 fails in 850 tests) but the CNN based algorithm is too slow on boards like Raspberry Pi around 1-2 FPS at 720p. Shall I try PCA /ICA based techniques?