class_docstr: Task for image vectorisation.
  
  Attributes:
      model:
          1. Model name
          2. Model name on Backprop's image-vectorisation endpoint
          3. Model object that implements the image-vectorisation task
      local (optional): Run locally. Defaults to False
      api_key (optional): Backprop API key for non-local inference
      device (optional): Device to run inference on. Defaults to "cuda" if available.
class_docstr_tok: ["Task","for","image","vectorisation",".","Attributes",":","model",":","1",".","Model","name","2",".","Model","name","on","Backprop","'s","image-vectorisation","endpoint","3",".","Model","object","that","implements","the","image-vectorisation","task","local","(","optional",")",":","Run","locally",".","Defaults","to","False","api_key","(","optional",")",":","Backprop","API","key","for","non-local","inference","device","(","optional",")",":","Device","to","run","inference","on",".","Defaults","to","``","cuda","''","if","available","."]
code: def __init__(
      self,
      model: Union[str, BaseModel] = None,
      local: bool = False,
      api_key: str = None,
      device: str = None,
  ):
      models = AutoModel.list_models(task=TASK)
  
      super().__init__(
          model,
          local=local,
          api_key=api_key,
          device=device,
          models=models,
          task=TASK,
          default_local_model=DEFAULT_LOCAL_MODEL,
          local_aliases=LOCAL_ALIASES,
      )
  
imports: from typing import List, Tuple, Union, Dict
  from .base import Task
  from backprop.models import BaseModel, AutoModel
  import base64
  from PIL import Image
  from io import BytesIO
  import requests
  from backprop.utils import img_to_base64, path_to_img
  from backprop.utils.samplers import SameGroupSampler
  from backprop.utils.losses import TripletLoss
  import torch
  import torch.nn.functional
  import random
  from backprop.utils.datasets import ImageGroupDataset, ImagePairDataset
  from torch.utils.data.dataloader import DataLoader
  import os
label_desc: Use image node_id 1 to create a new ImageVectorisation object from inherited base classes: Task with example: obj = ImageVectorisation(model, local, api_key, device)