Image

The Image component is an operator component that allows users to manipulate image files. It can carry out the following tasks:

#Release Stage

Alpha

#Configuration

The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.

#Supported Tasks

#Concat

Concatenate images horizontally or vertically. All images must have the same width and height. If grid-width and grid-height are not provided, the images will be concatenated to a square grid.

InputField IDTypeDescription
Task ID (required)taskstringTASK_CONCAT
Images (required)imagesarrayInput images.
Grid Widthgrid-widthintegerGrid width. If grid-width is provided, grid-height will be ignored.
Grid Heightgrid-heightintegerGrid height. If grid-height is provided, grid-width will be ignored.
PaddingpaddingintegerPadding between images. If padding is provided, it will be applied to all four sides of the image.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Crop

Crop image to the specified size.

InputField IDTypeDescription
Task ID (required)taskstringTASK_CROP
Image (required)imagestringInput image.
Corner Radiuscorner-radiusintegerRadius from the corner of the image to crop the image. If corner-radius is provided, circle-radius will be ignored. If the corner-radius is larger than half of min(width, height), the min(width, height) will be applied to corner-radius .
Circle Radiuscircle-radiusintegerRadius from the center of the circle to crop the image. If circle-radius is provided, corner-radius will be ignored. If the circle-radius is larger than half of min(width, height), the min(width, height) will be applied to circle-radius.
Top Offsettop-offsetintegerTop offset of the crop.
Right Offsetright-offsetintegerRight offset of the crop.
Bottom Offsetbottom-offsetintegerBottom offset of the crop.
Left Offsetleft-offsetintegerLeft offset of the crop.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Resize

Resize image to the specified size.

InputField IDTypeDescription
Task ID (required)taskstringTASK_RESIZE
Image (required)imagestringInput image.
RatiorationumberResize ratio (e.g., 0.5 for half size, 2 for double size) to resize the image. If ratio is provided, width and height will be ignored.
WidthwidthintegerWidth of the output image.
HeightheightintegerHeight of the output image.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw Classification

Draw classification result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_CLASSIFICATION
Category (required)categorystringThe predicted category of the input.
Image (required)imagestringInput image.
Show Scoreshow-scorebooleanShow model confidence score on each instance.
Score (required)scorenumberThe confidence score of the predicted category of the input.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw Detection

Draw detection result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_DETECTION
Image (required)imagestringInput image.
Objects (required)objectsarrayA list of detected objects.
Show Scoreshow-scorebooleanShow model confidence score on each instance.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw Keypoint

Draw keypoint result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_KEYPOINT
Image (required)imagestringInput image.
Objects (required)objectsarrayA list of keypoint objects, a keypoint object includes all the pre-defined keypoints of a detected object.
Show Scoreshow-scorebooleanShow model confidence score on each instance.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw OCR

Draw OCR result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_OCR
Image (required)imagestringInput image.
Objects (required)objectsarrayA list of detected bounding boxes.
Show Scoreshow-scorebooleanShow model confidence score on each instance.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw Instance Segmentation

Draw instance segmentation result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_INSTANCE_SEGMENTATION
Image (required)imagestringInput image.
Objects (required)objectsarrayA list of detected instance bounding boxes.
Show Scoreshow-scorebooleanShow model confidence score on each instance.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.

#Draw Semantic Segmentation

Draw semantic segmentation result on the image.

InputField IDTypeDescription
Task ID (required)taskstringTASK_DRAW_SEMANTIC_SEGMENTATION
Image (required)imagestringInput image.
Stuffs (required)stuffsarrayA list of RLE binary masks.
OutputField IDTypeDescription
Imageimageimage/pngOutput image.