Need advice on image processing pipeline