Skip to content

Preparing processors

The algorithm consists of multiple processors that can be combined to produce the desired results. When creating a list of processors, ALWAYS the first in the list of processor must be DetectCarMaskProcessor or DetectInteriorMaskProcessor. Subsequent processors are executed in the order in which they were entered in the configuration.

ReadExifDataProcessor

It is used to read data from the Exif. Reading the data makes it possible for the stabilization to work better.

Example of usage

[
    {
        "processorName": "ReadExifDataProcessor"
    },
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.0,
        "carCropThreshold": 0.0
    },
    {
        "processorName": "CarKeyPointsProcessor",
        "carDetectionThreshold": 0.0
    },
    {
        "processorName": "InterestPointsDetectionProcessor",
        "scale": 0.5
    },
    {
        "processorName": "SpinStabilizationProcessor",
        "scale": 0.5,
        "csMode": true,
        "ellipticTrack": true
    },
    {
        "processorName": "AnchoringComputeProcessor",
        "width": -1,
        "height": -1,
        "billboards": [
            "none"
        ],
        "backgroundDirectory": "platform_12",
        "billboardReflection": false,
        "carScale": 0.55,
        "cropCar": true,
        "keepCarOnImage": true,
        "marginLeft": 0.15,
        "marginRight": 0.15,
        "marginUp": 0.2,
        "marginDown": 0.1,
        "aspectRatio": "4:3",
        "photosSorted": false,
        "reverseYaw": true,
        "billboardsPatternMode": null,
        "singleBillboardHeight": -1.0
    },
    {
        "processorName": "AnchoringApplyProcessor"
    },
    {
        "processorName": "DetectCarShadowProcessor"
    },
    {
        "processorName": "PlaceShadowProcessor",
        "background": "original",
        "shadowOpacity": 0.9,
        "shadowSize": 0.5,
        "advancedShadowEnabled": true,
        "advancedShadowShift": 0.25,
        "advancedShadowStrength": 0.5
    }
]  

PreAnalysisProcessor

Processor uses: CarKeyPointsProcessor, CarBodyClassificationProcessor, CarColorClassificationProcessor, ImageQualityProcessor.

When elements on picture will be detected of:

  • Internal elements (BackSeat, BackupCamera, Dashboard, DoorOpenView, DoorPanel, FrontSeat, GearShift, InfotainmentSystem, Mileage, Navigation, Panorama, SeatButtons, StartStopButton, SteeringWheel, SteeringWheelButtons, Sunroof). Processor returns properties: element_name, brightness, darkness, blurred, resolution, rotation, interdet_bbox.

  • ExteriorWholeSideElement (ExteriorBack, ExteriorBackCorner, ExteriorFront, ExteriorFrontCorner, ExteriorSide). Processor returns properties: element_name, brightness, darkness, blurred, resolution, rotation, car_bbox, keypoints(LeftBackWheelBottom, RightBackWheelBottom, LeftFrontWheelBottom, RightFrontWheelBottom), car_color, cropped, angles, doors open.

  • ExteriorWholeOtherElement: (ExteriorTop). Processor returns properties: element_name, brightness, darkness, blurred, resolution, rotation, car_bbox, car_color, cropped.

  • ExteriorDetailElement: (Trunk, Wheel, WingMirror, Light, Engine). Processor returns properties: element_name, brightness, darkness, blurred, resolution, rotation.

  • OtherElement: (VIN,Info,Keys). Processor returns properties: element_name, brightness, darkness, blurred, resolution, rotation.

Parameters
  • save true/false, by default false. If true saves original image and with new extension, which is taken from configuration file, if uploaded image is, for example, rotated by 90 degrees, then original image is saved as well as rotated one with new extension to position 0.
Example of usage

[
    {
        "processorName": "PreAnalysisProcessor",
        "save": false
    }
]

Example result

ClassificationProcessor

It is used to check what is present in the picture. This processor is primarily utilized when subsequent steps are based on the object in the photo - for example, a shadow overlay processor interprets values generated by this processor. The processor is utilized in the following:

The processor supports the following classes: BackSeat, BackupCamera, Dashboard, DoorOpenView, DoorPanel, Engine, ExteriorBack, ExteriorBackCorner, ExteriorFront, ExteriorFrontCorner, ExteriorSide, ExteriorTop, FrontSeat, GearShift, Info, InfotainmentSystem, Keys, Light, Mileage, Navigation, Panorama, SeatButtons, StartStopButton, SteeringWheel, SteeringWheelButtons, Sunroof, Trunk, VIN, Wheel, WingMirror.

Sample images of supported classes
BackSeat

ClimateControl

Dashboard

DoorOpenView

DoorPanel

Engine

FrontSeat

GearShift

Info

Keys

Light

Mileage

Navigation

Panorama

SteeringWheel

SteeringWheelButtons

Sunroof

Trunk

Wheel

WingMirror

InfotainmentSystem

SeatButtons

VIN

BackupCamera

ExteriorTop

ExteriorBack

ExteriorBackCorner

ExteriorFront

ExteriorFrontCorner

ExteriorSide

In addition, with this processor it is possible to check the orientation of the image taken (0°, 90°, 180°, 270°) and rotate it if necessary.

Parameters
  • checkAngle true/false, by default false. true Return information on the orientation of the photo.
  • rotate true/false, by default false. true Rotate the photo if it is not uploaded in the right orientation. To enable checkAngle must be set to true.
  • angleScoreThreshold - Value from 0 to 1, by default 0.5. Threshold of correct detection of rotation angle. Rotate if the probability of correct rotation is greater than the set value. For 1 photo will never be rotated. For 0, the photo will always be rotated if another photo rotation is detected, and the parameters: rotate and checkAngle set to true.
Example of usage

[
    {
        "processorName": "ClassificationProcessor",
        "checkAngle": true,
        "rotate": true,
        "angleScoreThreshold": 0.5
    },
    {
        "processorName": "ReadExifDataProcessor",
        "rotate": true
    },
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.0,
        "carCropThreshold": 0.0,
        "estimateMaskScore": false
    },
    {
        "processorName": "CarKeyPointsProcessor",
        "carDetectionThreshold": 0.0
    },      
{ "processorName": "WindowSegmentationProcessor", "confidenceThreshold": 0.3 }, { "processorName": "SemiTransparentWindowsProcessor", "windowTransparency": 0.15, "windowBrightness": 0.0, "minWindowSize": 0.001, "minWindowBrightness": 0.15 }, { "processorName": "ChangePlateProcessor", "background": "#ffffff", "blurKernelSize": 0.5, "manageAllPlates": false }, { "processorName": "PlaceCarComputeProcessor", "platformDirectory": "handmade", "width": -1, "height": -1, "cropCar": true, "keepCarOnImage": true, "marginLeft": 0.15, "marginRight": 0.15, "marginUp": 0.2, "marginDown": 0.1, "aspectRatio": "4:3", "photosSorted": false, "reverseYaw": true, "smoothMovement": false, "background": "#FFFFFF", "horizonLine": 0.5, "platformWidth": 0.8 }, { "processorName": "AnchoringApplyProcessor" }, { "processorName": "DetectCarShadowProcessor", "detail": false }, { "processorName": "PlaceShadowProcessor", "background": "original", "shadowOpacity": 0.9, "shadowSize": 0.5, "advancedShadowEnabled": true, "advancedShadowShift": 0.25, "advancedShadowStrength": 0.5 } ]

Example result

To read the detected class of the element in the photo and the angle of rotation with probability, use endpoint, which returns the detail information:

Example endpoints

/v1/process/single/{configurationNameOrDecision}/details /v1/process/single/url/{configurationNameOrDecision}/async/details /v1/process/multiple/{configurationNameOrDecision}/details /v1/process/multiple/urls/{configurationNameOrDecision}/details

Example result

DetectCarMaskProcessor

It extracts the car segmentation mask for external images of vehicles with all doors closed ar all doors open. It has to be called at the beginning of the scope.

Proper Scope

Do not forget to replace background, for example, by calling CleanBackgroundProcessor.

Parameters
  • carDetectionThreshold - Value from 0 to 1, by default 0.0. Threshold for car detection score. If no car is detected above the threshold, an error will be reported: Client side processing error due to: Car not found in the image. Note if you specify a value of 1 the system always returns an error.
  • carCropThreshold - Value from 0 to 1, by default 0.0. - Set if you want to reject photos where the car is cut off. A value of 1 means that only uncut cars are allowed. If car is cut off above the threshold, an error will be reported: Client side processing error due to: The car in this image is cut off.
carCropThreshold description in the images

Output Properties

check process photo details.

  • segmentation_score - Value from 0 to 1. 1 means best score; 0.5 is acceptable.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.6,
        "carCropThreshold": 0.7
    },
    {
        "processorName": "CleanBackgroundProcessor",
        "enableShadow": false,
        "color": "#C0C0C0"
    }
]

Example result

CarKeyPointsProcessor

It is used auxiliary to some processors. You have to call it up beforehand when you want to use in your setup:

  • AnchoringComputeProcessor,
  • HorizontalStabilizationComputeProcessor,
  • PlaceCarComputeProcessor,
  • RollCompensationProcessor ,
  • advancedShadowEnabled: true in the PlaceShadowProcessor,
  • useKeypoints: true in the PlaceCarProcessor and HorizontalBlurProcessor.
Parameters
  • carDetectionThreshold - Value from 0 to 1, by default 0.0. Threshold for car detection score. If no car is detected above the threshold, an error will be reported: Client side processing error due to: Car not found in the image. Note if you specify a value of 1 the system always returns an error.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "CarKeyPointsProcessor",
        "carDetectionThreshold": 0.6
    },
    {
        "processorName": "DetectCarShadowProcessor"
    },
    {
        "processorName": "PlaceShadowProcessor",
        "background": "#FFFFFF",
        "shadowOpacity": 0.9,
        "shadowSize": 0.5,
        "advancedShadowEnabled": true, 
        "advancedShadowShift": 0.25,
        "advancedShadowStrength": 0.5
    }
]

ImageQualityProcessor

Measures image quality - it can be useful together with calling processors with detailed reply.

Parameters
  • No parameters required.
Output Properties
  • image_quality - Values from 0 to 1; 1 means best score; 0.5 is acceptable:
    • darkness: indicates whether the image is to dark or not.
    • brightness: indicates whether the image is to light or not.
    • blurred: indicates whether the image is too blurry or not.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "ImageQualityProcessor"
    }
]

InterestPointsDetectionProcessor

It is used auxiliary to some processors. You have to call it up beforehand when you want to use in your setup: SpinStabilizationProcessor.

Parameters
  • scale - Value from 0.01 to 1, by default 0.5. Scale in which interest points will be detected.

CarBodyClassificationProcessor

The processor is used to adjust the scale of the car based on the detected body type. For this to work, the DetectCarMaskProcessor must be used beforehand. The processor supports the following classes: Sedan_coupe, SuperCars, SUV, VAN, Box_truck, Camper, Combi, Hatchback, Heavy_truck, Jeep, Pickup.

Example photos
Sedan_coupe

SuperCars

SUV

VAN

Box_truck

Camper

Combi

Hatchback

Heavy_truck

Jeep

Pickup

Parameters
  • No parameters required.
Example of usage

[
    {
        "processorName": "ReadExifDataProcessor",
        "rotate": true
    },
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.0,
        "carCropThreshold": 0.0,
        "estimateMaskScore": false
    },
    {
        "processorName": "CarKeyPointsProcessor",
        "carDetectionThreshold": 0.0
    },
        {
        "processorName": "CarBodyClassificationProcessor"
    },
        {
        "processorName": "AnchoringComputeProcessor",
        "width": -1,
        "height": -1,
        "billboards": [
            "none"
        ],
        "backgroundDirectory": "platform_32_5",
        "billboardReflection": true,
        "carScale": 1.0,
        "cropCar": true,
        "keepCarOnImage": true,
        "marginLeft": 0.15,
        "marginRight": 0.15,
        "marginUp": 0.2,
        "marginDown": 0.1,
        "aspectRatio": "4:3",
        "smoothMovement": false,
        "photosSorted": false,
        "reverseYaw": true,
        "singleBillboardHeight": -1.0,
        "globalBillboardVerticalAlign": 1.0,
        "bboxStabilization": false,
        "carBodyClassRescale": true
    },
    {
        "processorName": "AnchoringApplyProcessor"
    }
]

Example results

CarColorClassificationProcessor

The processor detects paint color based on uploaded car photo.

Parameters
  • No parameters required.
Example of usage

[
    {
     "processorName": "ReadExifDataProcessor",
     "rotate": true
    },
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.0,
        "carCropThreshold": 0.0,
        "estimateMaskScore": false
    },
    {
        "processorName": "CarColorClassificationProcessor"
    }
]

Example results

WindowSegmentationProcessor

It extracts the windows segmentation mask for external images of vehicles with all doors closed ar all doors open. It has to be called before: SemiTransparentWindowsProcessor.

Parameters
  • confidenceThreshold - Value from 0 to 1, by default 0.3. Threshold for windows detection score.
Example of usage

[
    {
        "processorName": "ReadExifDataProcessor",
        "rotate": true
    },
    {
        "processorName": "DetectCarMaskProcessor",
        "carDetectionThreshold": 0.0,
        "carCropThreshold": 0.0,
        "estimateMaskScore": false
    },
    {
        "processorName": "CarKeyPointsProcessor",
        "carDetectionThreshold": 0.0
    },
    {
        "processorName": "WindowSegmentationProcessor",
        "confidenceThreshold": 0.3
    },
    {
        "processorName": "SemiTransparentWindowsProcessor",
        "windowTransparency": 0.15,
        "windowBrightness": 0.0,
        "minWindowSize": 0.001,
        "minWindowBrightness": 0.15
    },
    {
        "processorName": "DetectCarShadowProcessor",
        "detail": false
    },
    {
        "processorName": "PlaceShadowProcessor",
        "background": "#ffffff",
        "shadowOpacity": 0.9,
        "shadowSize": 0.5,
        "advancedShadowEnabled": true,
        "advancedShadowShift": 0.25,
        "advancedShadowStrength": 0.5
    }
]

AnchoringApplyProcessor

It is used to apply changes set in AnchoringComputeProcessor and PlaceCarComputeProcessor processors.

Parameters
  • brightness - Value from -1 to 1, by default 0.0. Adjusts the overall brightness of the image.
  • contrast - Value from -1 to 1, by default 0.0. Adjusts the overall contrast of the image.
  • luminance - Value from -1 to 1, by default 0.0. Adjusts the overall luminance of the image.
  • saturation - Value from -1 to 1, by default 0.0. Indicates color intensity, measured in percentages from 0% (gray) to 100% (full saturation).
  • hue - Value from -1 to 1, by default 0.0. Determines the color in the color spectrum, measuring it in degrees from 0 to 360, where each angle corresponds to a different color.
  • temperature - Value from -1 to 1, by default 0.0. Adjusts the overall temperature of the image.
  • exposure - Value from -1 to 1, by default 0.0. Adjusts the overall exposure of an image.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "ChangePlateProcessor",
        "background": "original",
        "blurKernelSize": 0.5
    },
    {
        "processorName": "CarKeyPointsProcessor"
    },
    {
        "processorName": "RollCompensationProcessor"
    },
    {
        "processorName": "AnchoringComputeProcessor",
        "width": -1,
        "height": 1080,
        "billboards": [
            "none"
        ],
        "backgroundDirectory": "platform_1",
        "billboardReflection": false,
        "carScale": 0.8,
        "cropCar": false,
        "keepCarOnImage": true,
        "marginLeft": 0.0,
        "marginRight": 0.0,
        "marginUp": 0.0,
        "marginDown": 0.0,
        "aspectRatio": "4:3",
        "photosSorted": false,
        "reverseYaw": true
    },
    {
        "processorName": "AnchoringApplyProcessor"
        "brightness": 0.0,
        "contrast": 0.0,
        "luminance": 0.0,
        "saturation": 0.0,
        "hue": 0.0,
        "temperature": 0.0,
        "exposure": 0.0
    }
]

HorizontalStabilizationApplyProcessor

It is used to apply the changes set in HorizontalStabilizationComputeProcessor processor.

Proper Scope

To apply horizontal stabilization you have to call first CarKeyPointsProcessor and HorizontalStabilizationComputeProcessor.

Parameters
  • No parameters required.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "CarKeyPointsProcessor"
    },
    {
        "processorName": "HorizontalStabilizationComputeProcessor",
        "width": -1,
        "height": -1,
        "marginLeft": 0.15,
        "marginRight": 0.15,
        "marginUp": 0.2,
        "marginDown": 0.1,
        "aspectRatio": "4:3",
        "photosSorted": false,
        "reverseYaw": true,
        "blurKernelSize": 0.076389,
        "blurLineDelta": 0,
        "blurGradient": 0.1,
        "blurBackground": "original",
        "curtainEnabled": false
    },
    {
        "processorName": "HorizontalStabilizationApplyProcessor"
    }
]

DetectCarShadowProcessor

Detects shadow for exterior cars images (open and closed doors). This is more sophisticated version of shadow - to save costs you should used enableShadow parameter in CleanBackgroundProcessor.

Proper Scope

To apply a shadow you have to call PlaceShadowProcessor afterwards.

Parameters
  • detail - true/false, by default false. If true, the shadow to the detail is selected, when false it is the shadow to the exterior.
Example of usage

[
    {
        "processorName": "DetectCarMaskProcessor"
    },
    {
        "processorName": "WindowSegmentationProcessor",
        "confidenceThreshold": 0.3
    }
    {
        "processorName": "SemiTransparentWindowsProcessor",
        "windowTransparency": 0.15,
        "windowBrightness": 0.0
    },
    {
        "processorName": "DetectCarShadowProcessor"
        "detail": true
    },
    {
        "processorName": "PlaceShadowProcessor",
        "background": "#FFFFFF",
        "shadowOpacity": 0.9,
        "shadowSize": 0.5,
        "advancedShadowEnabled":false,
        "advancedShadowShift": 0.25,
        "advancedShadowStrength": 0.5
    }
]