Pixel Classification: flush stdout periodically to show batch mode progress.