class_docstr: Task for image classification.
  
  Attributes:
      model:
          1. Model name
          2. Model name on Backprop's image-classification endpoint
          3. Model object that implements the image-classification 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","classification",".","Attributes",":","model",":","1",".","Model","name","2",".","Model","name","on","Backprop","'s","image-classification","endpoint","3",".","Model","object","that","implements","the","image-classification","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
  from ..models import BaseModel
  from backprop.models import AutoModel
  from backprop.utils.datasets import SingleLabelImageClassificationDataset, MultiLabelImageClassificationDataset
  from .base import Task
  from PIL import Image
  from torch import nn
  import torch
  import numpy
  import base64
  import requests
  from io import BytesIO
  from backprop.utils.helpers import img_to_base64, path_to_img
label_desc: Use image node_id 1 to create a new ImageClassification object from inherited base classes: Task with example: obj = ImageClassification(model, local, api_key, device)