Class RelativeToAbsoluteStep
- java.lang.Object
-
- ai.konduit.serving.data.image.step.point.convert.RelativeToAbsoluteStep
-
- All Implemented Interfaces:
ai.konduit.serving.pipeline.api.step.PipelineStep,ai.konduit.serving.pipeline.api.TextConfig,java.io.Serializable
public class RelativeToAbsoluteStep extends java.lang.Object implements ai.konduit.serving.pipeline.api.step.PipelineStepFor a given set ofPoint,List<Point>,BoundingBoxorList<BoundingBox>that are defined in relative terms (i.e., all values 0.0 to 1.0 in terms of "fraction of image height/width"), convert these to absolute values (i.e., pixels) using:
(a) An input image, as specified via the imageName configuration, OR
(b) An image height, as specified by imageH and imageW configuration
Note that an ImageToNDArrayConfig can be provided, to account for the fact that the original image may have been cropped before being passed into a network that produced the Points or BoundingBoxes.
If the imageToNDArrayConfig field is null, it is assumed no cropping has occurred.- Author:
- Alex Black
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.IntegerimageHprotected java.lang.StringimageNameprotected ImageToNDArrayConfigimageToNDArrayConfigprotected java.lang.IntegerimageWprotected java.util.List<java.lang.String>toConvert
-
Constructor Summary
Constructors Constructor Description RelativeToAbsoluteStep()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelativeToAbsoluteSteptoConvert(java.lang.String... toConvert)
-
-
-
Field Detail
-
imageName
protected java.lang.String imageName
-
imageH
protected java.lang.Integer imageH
-
imageW
protected java.lang.Integer imageW
-
imageToNDArrayConfig
protected ImageToNDArrayConfig imageToNDArrayConfig
-
toConvert
protected java.util.List<java.lang.String> toConvert
-
-
Method Detail
-
toConvert
public RelativeToAbsoluteStep toConvert(java.lang.String... toConvert)
-
-