CDCgov / IDWA

Intelligent Data Workflow Automation
Apache License 2.0
1 stars 1 forks source link

Segment a photo from a segment template #8

Closed zdeveloper closed 5 months ago

zdeveloper commented 5 months ago

Segment an image based on a segmentation template image

Given we have the following resources

Input

form.png CHOLERA_form_filled_colored

segmentation_template.png CHOLERA_form_segmented

labels.json

{
 "255,0,0": "nbs_patient_id",
 "0,0,255": "nbs_cas_id"
}

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

Red segment red_segment_inverted

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

arinkulshi-skylight commented 5 months ago

I have some questions on this ticket. So will mark it as blocked for now.