The vtracer module can be used to convert a raster image to vector SVG image. See the code below;-
import vtracer # pip install vtracer
inp = "map.png"
out = '001'
# Minimal example: use all default values, generate a multicolor SVG
vtracer.convert_image_to_svg_py(inp, f'{out}_defaultcolor.svg')
# Single-color example. Good for line art, and much faster than full color:
vtracer.convert_image_to_svg_py(inp, f'{out}_blackandwhite.svg', colormode='binary')
print('Done...')
Original Raster Map Image
Resulting Vector SVG Map