limited background pixels in generate_training