调用detr-resnet-50进行目标检测
from transformers import DetrImageProcessor, DetrForObjectDetection
import torch
from PIL import Image
image = Image.open("1.jpg")
torch.set_default_device("cuda"
from transformers import DetrImageProcessor, DetrForObjectDetection
import torch
from PIL import Image
image = Image.open("1.jpg")
torch.set_default_device("cuda"