Image pipeline processing in python