ok ,this is the code . i run it on win10 , pycharm.

  
      github.com
  
  
    googlelee/TORCHVISION-OBJECT-DETECTION-FINETUNING-TUTORIAL/blob/master/main.py 7
import os
import numpy as np
import torch
import torch.utils.data as data
from PIL import Image
import torchvision
from torchvision.models.detection.faster_rcnn import FastRCNNPredictor
from torchvision.models.detection.mask_rcnn import MaskRCNNPredictor
from engine import train_one_epoch, evaluate
import utils
import transforms as T


class PennFudanDataset(data.Dataset):
    def __init__(self, root, transforms=None):
        self.root = root
        self.transforms = transforms
        # load all image files , sorting them to
        # ensure that they are aligned
        self.imgs = list(sorted(os.listdir(os.path.join(root, 'PNGImages'))))


  This file has been truncated. show original