Update image segmentation pipeline test #18731
                
     Merged
            
            
          
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
What does this PR do?
The image segmentation pipeline tests -
tests/pipelines/test_pipelines_image_segmentation.py- were failing after the merging of #1849 (49e44b2). This was due to the difference in rescaling.Previously the images were rescaled by
image = image / 255. In the new commit, arescalemethod was added, and images rescaled usingimage = image * scale. This was known to cause small differences in the processed images (seePR comment).
Testing locally, changing the
rescalemethod to divide by a scale factor (255) resulted in the tests passing. It was therefore decided after discussion with @ydshieh the test values could be updated, as there was no logic difference between the commits.Comparing masks
The same code as in the segmentation pipeline was run to compare the output masks.
Mask generate for output 0 on commit hash 86d0b26 (parent commit)

Mask generate for output 0 on commit hash 49e44b2

Checking the pixel values, there was a single pixel difference
Output:
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.