I’m trying to do the following:
- I’ve got a working yolov8 custom model trained and segmenting intersections as expected.
It predicts objects like this:
- What I want to do is to convert the segmented items above into polygons or lines, ie:
To clarify, the image above (2) would be a outcome of a geojson file, ie:
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
9689306.142846698,
4424394.307639465
],
[
9689296.790935714,
4424382.4802226419
]
]
},
"properties": {
"pedId": 2,
"domain": "pedestrian_crossing",
"width": 3.0,
"nearestRoadId": 2
}
},
Does anyone know a way to make this conversion? (results.masks -> GeoJSON)