unityaisolutions/vectorizer
Converts raster images to SVG vectors.
Run unityaisolutions/vectorizer with an API
Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.
Input schema
The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.
| Field | Type | Default value | Description |
|---|---|---|---|
| image |
string
|
Input raster image (PNG, JPG, etc.)
|
|
| color_mode |
None
|
color
|
Color processing mode
|
| hierarchical |
None
|
stacked
|
Hierarchical clustering mode
|
| filter_speckle |
integer
|
4
Max: 100 |
Remove speckles smaller than this size (0-100)
|
| color_precision |
integer
|
6
Min: 1 Max: 8 |
Color precision/number of colors (1-8, lower = fewer colors)
|
| layer_difference |
integer
|
16
Max: 100 |
Layer difference threshold (0-100, higher = fewer layers)
|
| corner_threshold |
integer
|
60
Max: 180 |
Corner detection threshold (0-180 degrees)
|
| segment_length |
number
|
10
Min: 3.5 Max: 50 |
Segment length for curve approximation
|
| splice_threshold |
integer
|
45
Max: 180 |
Splice threshold for curve simplification (0-180 degrees)
|
{
"type": "object",
"title": "Input",
"required": [
"image"
],
"properties": {
"image": {
"type": "string",
"title": "Image",
"format": "uri",
"x-order": 0,
"description": "Input raster image (PNG, JPG, etc.)"
},
"color_mode": {
"enum": [
"color",
"binary"
],
"type": "string",
"title": "color_mode",
"description": "Color processing mode",
"default": "color",
"x-order": 1
},
"hierarchical": {
"enum": [
"stacked",
"cutout"
],
"type": "string",
"title": "hierarchical",
"description": "Hierarchical clustering mode",
"default": "stacked",
"x-order": 2
},
"filter_speckle": {
"type": "integer",
"title": "Filter Speckle",
"default": 4,
"maximum": 100,
"minimum": 0,
"x-order": 3,
"description": "Remove speckles smaller than this size (0-100)"
},
"segment_length": {
"type": "number",
"title": "Segment Length",
"default": 10,
"maximum": 50,
"minimum": 3.5,
"x-order": 7,
"description": "Segment length for curve approximation"
},
"color_precision": {
"type": "integer",
"title": "Color Precision",
"default": 6,
"maximum": 8,
"minimum": 1,
"x-order": 4,
"description": "Color precision/number of colors (1-8, lower = fewer colors)"
},
"corner_threshold": {
"type": "integer",
"title": "Corner Threshold",
"default": 60,
"maximum": 180,
"minimum": 0,
"x-order": 6,
"description": "Corner detection threshold (0-180 degrees)"
},
"layer_difference": {
"type": "integer",
"title": "Layer Difference",
"default": 16,
"maximum": 100,
"minimum": 0,
"x-order": 5,
"description": "Layer difference threshold (0-100, higher = fewer layers)"
},
"splice_threshold": {
"type": "integer",
"title": "Splice Threshold",
"default": 45,
"maximum": 180,
"minimum": 0,
"x-order": 8,
"description": "Splice threshold for curve simplification (0-180 degrees)"
}
}
}
Output schema
The shape of the response you’ll get when you run this model with an API.
{
"type": "string",
"title": "Output",
"format": "uri"
}