Write a python function that takes the previous parameters and outputs a dictionary with segmented images in the format of numpy ndarray
Output
Blue segment
Red segment
Acceptance Criteria
the function should have the following signature
def segment(image, segmentation_template, labels)
Returns a dictionary containg the segmented images, with the labels.json value as the key, and the image ndarray as the value
No other input should be given to the function.
Please make sure you have a variety of tests there, for the purposes of tests, go ahead an output these images
Segment an image based on a segmentation template image
Given we have the following resources
Input
form.png
segmentation_template.png
labels.json
Write a python function that takes the previous parameters and outputs a dictionary with segmented images in the format of numpy ndarray
Output
Blue segment![blue_segment_inverted](https://github.com/CDCgov/IDWA/assets/4952042/08882257-ab26-44e3-b09a-31e721c79c1a)
Red segment![red_segment_inverted](https://github.com/CDCgov/IDWA/assets/4952042/db3e2b8c-6537-4a69-a379-987d51bf55a3)
Acceptance Criteria
the function should have the following signature
def segment(image, segmentation_template, labels)
Returns a dictionary containg the segmented images, with the labels.json value as the key, and the image ndarray as the value
No other input should be given to the function. Please make sure you have a variety of tests there, for the purposes of tests, go ahead an output these images
Additional context Please read the following doc