VGG实战猫狗大赛分类【Pytorch】1

1 前言

1.1 vgg总览

vgg(visual geometry group)是一种深度卷积神经网络架构,由牛津大学的视觉几何组开发。vgg网络以其简单性和深度而著称,它主要通过重复使用相同的卷积核和池化操作来构建深层网络。vgg模型有多个版本,其中最著名的是vgg-16和vgg-19,分别包含16个和19个权重层。

vgg网络的主要特点包括:
使用非常小的卷积核(3x3),以捕获图像中的局部特征。
使用多个卷积核连续进行卷积操作,以增加网络的深度。
在卷积层之间使用最大池化(max pooling)来减小特征图的尺寸。
在网络的最后部分使用全连接层,用于分类任务。

vgg_arch
请添加图片描述

vgg可以解决多种计算机视觉问题,包括但不限于:
图像分类:识别图像中的主要对象或场景。
物体检测:定位图像中的一个或多个对象,并识别它们是什么。
语义分割:对图像中的每个像素进行分类,以区分不同的物体或区域。
人脸识别:识别图像中的人脸并进行身份验证或属性分析。
风格迁移:将一种图像的风格应用到另一种图像上,例如将艺术作品的风格应用到普通照片上。

该项目是试图教会大家,如何利用vgg网络完成一个图像分类问题,主要用到的数据是Kaggle猫狗大赛图像识别提供的数据集。

1.2 VGG代码结构

在这里插入图片描述

2 准备工作

2.1项目环境配置

  • Python 3.x
  • jupyter notebook
  • torch >1.0
  • torchsummary 1.5.1
  • torchvision 0.4.0+cu92
  • Pillow 6.1.0
  • numpy 1.17.0
  • opencv-python 4.1.2.30

2.2 数据集下载

猫狗大战数据集,可以在https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition/data 下载

2.3 预训练权重下载

'vgg11': 'https://download.pytorch.org/models/vgg11-bbd30ac9.pth',
'vgg13': 'https://download.pytorch.org/models/vgg13-c768596a.pth',
'vgg16': 'https://download.pytorch.org/models/vgg16-397923af.pth',
'vgg19': 'https://download.pytorch.org/models/vgg19-dcbb9e9d.pth',
'vgg11_bn': 'https://download.pytorch.org/models/vgg11_bn-6002323d.pth',
'vgg13_bn': 'https://download.pytorch.org/models/vgg13_bn-abd245e5.pth',
'vgg16_bn': 'https://download.pytorch.org/models/vgg16_bn-6c64b313.pth',
'vgg19_bn': 'https://download.pytorch.org/models/vgg19_bn-c79401a0.pth',

3 项目代码结构

3.1 vgg_inference.py

采用在Imagenet上预训练的VGG16模型进行分类测试

3.2 train_vgg.py

构建一个VGG16模型,在猫狗数据集上训练分类任务

4 算法模块及细节

4.1 vgg_inference.py中各函数模块详解(inference.ipynb)

设置环境变量和导入所需的库

# -*- coding: utf-8 -*-
import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
BASE_DIR = os.path.dirname(os.getcwd())
import sys
sys.path.append(BASE_DIR)
import time
import json
import torch.nn as nn
import torch
import torchvision.transforms as transforms
from PIL import Image
from matplotlib import pyplot as plt
import torchvision.models as models
from tools.common_tools import get_vgg16
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
BASE_DIR

运行结果:

'e:\\Deep_learning_work\\B_VGG'

图片预处理

img_transform函数用于将图像数据转换为模型可读取的形式。
process_img函数用于处理图像数据,包括加载图像、转换为张量和移动到设备。
示例图片:
在这里插入图片描述


def img_transform(img_rgb, transform=None):
    """
    将数据转换为模型读取的形式
    :param img_rgb: PIL Image
    :param transform: torchvision.transform
    :return: tensor
    """

    if transform is None:
        raise ValueError("找不到transform!必须有transform对img进行处理")

    img_t = transform(img_rgb)
    return img_t


def process_img(path_img):

    # hard code
    norm_mean = [0.485, 0.456, 0.406]
    norm_std = [0.229, 0.224, 0.225]
    inference_transform = transforms.Compose([
        transforms.Resize(256),
        transforms.CenterCrop((224, 224)),
        transforms.ToTensor(),
        transforms.Normalize(norm_mean, norm_std),
    ])

    # path --> img
    img_rgb = Image.open(path_img).convert('RGB')

    # img --> tensor
    img_tensor = img_transform(img_rgb, inference_transform)
    img_tensor.unsqueeze_(0)        # chw --> bchw
    img_tensor = img_tensor.to(device)

    return img_tensor, img_rgb

path_img = os.path.join(BASE_DIR, "data","Golden Retriever.jpg")

print(path_img)
img_tensor, img_rgb = process_img(path_img)
print(img_tensor, img_tensor.shape)
print(img_rgb, img_rgb.size)
plt.imshow(img_rgb)

运行结果:

e:\Deep_learning_work\B_VGG\data\Golden Retriever.jpg
tensor([[[[ 0.6392,  0.5878,  0.5364,  ..., -0.4911, -0.5767, -0.4911],
          [ 0.5193,  0.4851,  0.5536,  ..., -0.5082, -0.3541, -0.2856],
          [ 0.6392,  0.5536,  0.6392,  ..., -0.4226, -0.2513, -0.1999],
          ...,
          [ 0.0227,  0.1083, -0.0972,  ...,  0.5193,  0.6734,  0.3138],
          [-0.1657, -0.3027, -0.6281,  ...,  0.5536,  0.7419,  0.3138],
          [-0.2856, -0.3883, -0.5082,  ...,  0.3309,  0.3138,  0.2796]],

         [[ 0.7654,  0.7304,  0.6954,  ..., -0.1800, -0.2850, -0.2150],
          [ 0.6779,  0.6604,  0.7304,  ..., -0.2150, -0.0924, -0.0749],
          [ 0.8179,  0.7654,  0.8354,  ..., -0.1975, -0.0749, -0.0749],
          ...,
          [ 0.1001,  0.2052,  0.0651,  ...,  0.6078,  0.7304,  0.4153],
          [-0.0224, -0.1450, -0.4076,  ...,  0.6954,  0.8704,  0.4328],
          [-0.0749, -0.1625, -0.2325,  ...,  0.5378,  0.5028,  0.4853]],

         [[-0.2707, -0.3404, -0.3753,  ..., -1.0201, -1.0898, -1.0027],
          [-0.3753, -0.4275, -0.3578,  ..., -1.0376, -0.9156, -0.9156],
          [-0.2532, -0.3404, -0.2532,  ..., -1.0027, -0.8981, -0.9330],
          ...,
          [-0.8110, -0.7238, -0.8284,  ..., -0.2184, -0.0441, -0.3404],
          [-0.8633, -0.9330, -1.1944,  ..., -0.2010,  0.0256, -0.3927],
          [-0.8807, -0.8981, -0.9853,  ..., -0.4275, -0.4275, -0.4275]]]],
       device='cuda:0') torch.Size([1, 3, 224, 224])
<PIL.Image.Image image mode=RGB size=770x590 at 0x15EDB03DCA0> (770, 590)
<matplotlib.image.AxesImage at 0x15e8004b340>

在这里插入图片描述

def load_class_names(p_clsnames, p_clsnames_cn):
    """
    加载标签名
    :param p_clsnames:
    :param p_clsnames_cn:
    :return:
    """
    with open(p_clsnames, "r") as f:
        class_names = json.load(f)
    with open(p_clsnames_cn, encoding='UTF-8') as f:  # 设置文件对象
        class_names_cn = f.readlines()
    return class_names, class_names_cn

path_classnames = os.path.join(BASE_DIR, "data", "imagenet1000.json")
path_classnames_cn = os.path.join(BASE_DIR, "data", "imagenet_classnames.txt")

cls_n, cls_n_cn = load_class_names(path_classnames, path_classnames_cn)
print(cls_n)
print(cls_n_cn)

运行结果:

['tench, Tinca tinca', 'goldfish, Carassius auratus', 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', 'tiger shark, Galeocerdo cuvieri', 'hammerhead, hammerhead shark', 'electric ray, crampfish, numbfish, torpedo', 'stingray', 'cock', 'hen', 'ostrich, Struthio camelus', 'brambling, Fringilla montifringilla', 'goldfinch, Carduelis carduelis', 'house finch, linnet, Carpodacus mexicanus', 'junco, snowbird', 'indigo bunting, indigo finch, indigo bird, Passerina cyanea', 'robin, American robin, Turdus migratorius', 'bulbul', 'jay', 'magpie', 'chickadee', 'water ouzel, dipper', 'kite', 'bald eagle, American eagle, Haliaeetus leucocephalus', 'vulture', 'great grey owl, great gray owl, Strix nebulosa', 'European fire salamander, Salamandra salamandra', 'common newt, Triturus vulgaris', 'eft', 'spotted salamander, Ambystoma maculatum', 'axolotl, mud puppy, Ambystoma mexicanum', 'bullfrog, Rana catesbeiana', 'tree frog, tree-frog', 'tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui', 'loggerhead, loggerhead turtle, Caretta caretta', 'leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea', 'mud turtle', 'terrapin', 'box turtle, box tortoise', 'banded gecko', 'common iguana, iguana, Iguana iguana', 'American chameleon, anole, Anolis carolinensis', 'whiptail, whiptail lizard', 'agama', 'frilled lizard, Chlamydosaurus kingi', 'alligator lizard', 'Gila monster, Heloderma suspectum', 'green lizard, Lacerta viridis', 'African chameleon, Chamaeleo chamaeleon', 'Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis', 'African crocodile, Nile crocodile, Crocodylus niloticus', 'American alligator, Alligator mississipiensis', 'triceratops', 'thunder snake, worm snake, Carphophis amoenus', 'ringneck snake, ring-necked snake, ring snake', 'hognose snake, puff adder, sand viper', 'green snake, grass snake', 'king snake, kingsnake', 'garter snake, grass snake', 'water snake', 'vine snake', 'night snake, Hypsiglena torquata', 'boa constrictor, Constrictor constrictor', 'rock python, rock snake, Python sebae', 'Indian cobra, Naja naja', 'green mamba', 'sea snake', 'horned viper, cerastes, sand viper, horned asp, Cerastes cornutus', 'diamondback, diamondback rattlesnake, Crotalus adamanteus', 'sidewinder, horned rattlesnake, Crotalus cerastes', 'trilobite', 'harvestman, daddy longlegs, Phalangium opilio', 'scorpion', 'black and gold garden spider, Argiope aurantia', 'barn spider, Araneus cavaticus', 'garden spider, Aranea diademata', 'black widow, Latrodectus mactans', 'tarantula', 'wolf spider, hunting spider', 'tick', 'centipede', 'black grouse', 'ptarmigan', 'ruffed grouse, partridge, Bonasa umbellus', 'prairie chicken, prairie grouse, prairie fowl', 'peacock', 'quail', 'partridge', 'African grey, African gray, Psittacus erithacus', 'macaw', 'sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita', 'lorikeet', 'coucal', 'bee eater', 'hornbill', 'hummingbird', 'jacamar', 'toucan', 'drake', 'red-breasted merganser, Mergus serrator', 'goose', 'black swan, Cygnus atratus', 'tusker', 'echidna, spiny anteater, anteater', 'platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus', 'wallaby, brush kangaroo', 'koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus', 'wombat', 'jellyfish', 'sea anemone, anemone', 'brain coral', 'flatworm, platyhelminth', 'nematode, nematode worm, roundworm', 'conch', 'snail', 'slug', 'sea slug, nudibranch', 'chiton, coat-of-mail shell, sea cradle, polyplacophore', 'chambered nautilus, pearly nautilus, nautilus', 'Dungeness crab, Cancer magister', 'rock crab, Cancer irroratus', 'fiddler crab', 'king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica', 'American lobster, Northern lobster, Maine lobster, Homarus americanus', 'spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish', 'crayfish, crawfish, crawdad, crawdaddy', 'hermit crab', 'isopod', 'white stork, Ciconia ciconia', 'black stork, Ciconia nigra', 'spoonbill', 'flamingo', 'little blue heron, Egretta caerulea', 'American egret, great white heron, Egretta albus', 'bittern', 'crane', 'limpkin, Aramus pictus', 'European gallinule, Porphyrio porphyrio', 'American coot, marsh hen, mud hen, water hen, Fulica americana', 'bustard', 'ruddy turnstone, Arenaria interpres', 'red-backed sandpiper, dunlin, Erolia alpina', 'redshank, Tringa totanus', 'dowitcher', 'oystercatcher, oyster catcher', 'pelican', 'king penguin, Aptenodytes patagonica', 'albatross, mollymawk', 'grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus', 'killer whale, killer, orca, grampus, sea wolf, Orcinus orca', 'dugong, Dugong dugon', 'sea lion', 'Chihuahua', 'Japanese spaniel', 'Maltese dog, Maltese terrier, Maltese', 'Pekinese, Pekingese, Peke', 'Shih-Tzu', 'Blenheim spaniel', 'papillon', 'toy terrier', 'Rhodesian ridgeback', 'Afghan hound, Afghan', 'basset, basset hound', 'beagle', 'bloodhound, sleuthhound', 'bluetick', 'black-and-tan coonhound', 'Walker hound, Walker foxhound', 'English foxhound', 'redbone', 'borzoi, Russian wolfhound', 'Irish wolfhound', 'Italian greyhound', 'whippet', 'Ibizan hound, Ibizan Podenco', 'Norwegian elkhound, elkhound', 'otterhound, otter hound', 'Saluki, gazelle hound', 'Scottish deerhound, deerhound', 'Weimaraner', 'Staffordshire bullterrier, Staffordshire bull terrier', 'American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier', 'Bedlington terrier', 'Border terrier', 'Kerry blue terrier', 'Irish terrier', 'Norfolk terrier', 'Norwich terrier', 'Yorkshire terrier', 'wire-haired fox terrier', 'Lakeland terrier', 'Sealyham terrier, Sealyham', 'Airedale, Airedale terrier', 'cairn, cairn terrier', 'Australian terrier', 'Dandie Dinmont, Dandie Dinmont terrier', 'Boston bull, Boston terrier', 'miniature schnauzer', 'giant schnauzer', 'standard schnauzer', 'Scotch terrier, Scottish terrier, Scottie', 'Tibetan terrier, chrysanthemum dog', 'silky terrier, Sydney silky', 'soft-coated wheaten terrier', 'West Highland white terrier', 'Lhasa, Lhasa apso', 'flat-coated retriever', 'curly-coated retriever', 'golden retriever', 'Labrador retriever', 'Chesapeake Bay retriever', 'German short-haired pointer', 'vizsla, Hungarian pointer', 'English setter', 'Irish setter, red setter', 'Gordon setter', 'Brittany spaniel', 'clumber, clumber spaniel', 'English springer, English springer spaniel', 'Welsh springer spaniel', 'cocker spaniel, English cocker spaniel, cocker', 'Sussex spaniel', 'Irish water spaniel', 'kuvasz', 'schipperke', 'groenendael', 'malinois', 'briard', 'kelpie', 'komondor', 'Old English sheepdog, bobtail', 'Shetland sheepdog, Shetland sheep dog, Shetland', 'collie', 'Border collie', 'Bouvier des Flandres, Bouviers des Flandres', 'Rottweiler', 'German shepherd, German shepherd dog, German police dog, alsatian', 'Doberman, Doberman pinscher', 'miniature pinscher', 'Greater Swiss Mountain dog', 'Bernese mountain dog', 'Appenzeller', 'EntleBucher', 'boxer', 'bull mastiff', 'Tibetan mastiff', 'French bulldog', 'Great Dane', 'Saint Bernard, St Bernard', 'Eskimo dog, husky', 'malamute, malemute, Alaskan malamute', 'Siberian husky', 'dalmatian, coach dog, carriage dog', 'affenpinscher, monkey pinscher, monkey dog', 'basenji', 'pug, pug-dog', 'Leonberg', 'Newfoundland, Newfoundland dog', 'Great Pyrenees', 'Samoyed, Samoyede', 'Pomeranian', 'chow, chow chow', 'keeshond', 'Brabancon griffon', 'Pembroke, Pembroke Welsh corgi', 'Cardigan, Cardigan Welsh corgi', 'toy poodle', 'miniature poodle', 'standard poodle', 'Mexican hairless', 'timber wolf, grey wolf, gray wolf, Canis lupus', 'white wolf, Arctic wolf, Canis lupus tundrarum', 'red wolf, maned wolf, Canis rufus, Canis niger', 'coyote, prairie wolf, brush wolf, Canis latrans', 'dingo, warrigal, warragal, Canis dingo', 'dhole, Cuon alpinus', 'African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus', 'hyena, hyaena', 'red fox, Vulpes vulpes', 'kit fox, Vulpes macrotis', 'Arctic fox, white fox, Alopex lagopus', 'grey fox, gray fox, Urocyon cinereoargenteus', 'tabby, tabby cat', 'tiger cat', 'Persian cat', 'Siamese cat, Siamese', 'Egyptian cat', 'cougar, puma, catamount, mountain lion, painter, panther, Felis concolor', 'lynx, catamount', 'leopard, Panthera pardus', 'snow leopard, ounce, Panthera uncia', 'jaguar, panther, Panthera onca, Felis onca', 'lion, king of beasts, Panthera leo', 'tiger, Panthera tigris', 'cheetah, chetah, Acinonyx jubatus', 'brown bear, bruin, Ursus arctos', 'American black bear, black bear, Ursus americanus, Euarctos americanus', 'ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus', 'sloth bear, Melursus ursinus, Ursus ursinus', 'mongoose', 'meerkat, mierkat', 'tiger beetle', 'ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle', 'ground beetle, carabid beetle', 'long-horned beetle, longicorn, longicorn beetle', 'leaf beetle, chrysomelid', 'dung beetle', 'rhinoceros beetle', 'weevil', 'fly', 'bee', 'ant, emmet, pismire', 'grasshopper, hopper', 'cricket', 'walking stick, walkingstick, stick insect', 'cockroach, roach', 'mantis, mantid', 'cicada, cicala', 'leafhopper', 'lacewing, lacewing fly', "dragonfly, darning needle, devil's darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk", 'damselfly', 'admiral', 'ringlet, ringlet butterfly', 'monarch, monarch butterfly, milkweed butterfly, Danaus plexippus', 'cabbage butterfly', 'sulphur butterfly, sulfur butterfly', 'lycaenid, lycaenid butterfly', 'starfish, sea star', 'sea urchin', 'sea cucumber, holothurian', 'wood rabbit, cottontail, cottontail rabbit', 'hare', 'Angora, Angora rabbit', 'hamster', 'porcupine, hedgehog', 'fox squirrel, eastern fox squirrel, Sciurus niger', 'marmot', 'beaver', 'guinea pig, Cavia cobaya', 'sorrel', 'zebra', 'hog, pig, grunter, squealer, Sus scrofa', 'wild boar, boar, Sus scrofa', 'warthog', 'hippopotamus, hippo, river horse, Hippopotamus amphibius', 'ox', 'water buffalo, water ox, Asiatic buffalo, Bubalus bubalis', 'bison', 'ram, tup', 'bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis', 'ibex, Capra ibex', 'hartebeest', 'impala, Aepyceros melampus', 'gazelle', 'Arabian camel, dromedary, Camelus dromedarius', 'llama', 'weasel', 'mink', 'polecat, fitch, foulmart, foumart, Mustela putorius', 'black-footed ferret, ferret, Mustela nigripes', 'otter', 'skunk, polecat, wood pussy', 'badger', 'armadillo', 'three-toed sloth, ai, Bradypus tridactylus', 'orangutan, orang, orangutang, Pongo pygmaeus', 'gorilla, Gorilla gorilla', 'chimpanzee, chimp, Pan troglodytes', 'gibbon, Hylobates lar', 'siamang, Hylobates syndactylus, Symphalangus syndactylus', 'guenon, guenon monkey', 'patas, hussar monkey, Erythrocebus patas', 'baboon', 'macaque', 'langur', 'colobus, colobus monkey', 'proboscis monkey, Nasalis larvatus', 'marmoset', 'capuchin, ringtail, Cebus capucinus', 'howler monkey, howler', 'titi, titi monkey', 'spider monkey, Ateles geoffroyi', 'squirrel monkey, Saimiri sciureus', 'Madagascar cat, ring-tailed lemur, Lemur catta', 'indri, indris, Indri indri, Indri brevicaudatus', 'Indian elephant, Elephas maximus', 'African elephant, Loxodonta africana', 'lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens', 'giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca', 'barracouta, snoek', 'eel', 'coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch', 'rock beauty, Holocanthus tricolor', 'anemone fish', 'sturgeon', 'gar, garfish, garpike, billfish, Lepisosteus osseus', 'lionfish', 'puffer, pufferfish, blowfish, globefish', 'abacus', 'abaya', "academic gown, academic robe, judge's robe", 'accordion, piano accordion, squeeze box', 'acoustic guitar', 'aircraft carrier, carrier, flattop, attack aircraft carrier', 'airliner', 'airship, dirigible', 'altar', 'ambulance', 'amphibian, amphibious vehicle', 'analog clock', 'apiary, bee house', 'apron', 'ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin', 'assault rifle, assault gun', 'backpack, back pack, knapsack, packsack, rucksack, haversack', 'bakery, bakeshop, bakehouse', 'balance beam, beam', 'balloon', 'ballpoint, ballpoint pen, ballpen, Biro', 'Band Aid', 'banjo', 'bannister, banister, balustrade, balusters, handrail', 'barbell', 'barber chair', 'barbershop', 'barn', 'barometer', 'barrel, cask', 'barrow, garden cart, lawn cart, wheelbarrow', 'baseball', 'basketball', 'bassinet', 'bassoon', 'bathing cap, swimming cap', 'bath towel', 'bathtub, bathing tub, bath, tub', 'beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon', 'beacon, lighthouse, beacon light, pharos', 'beaker', 'bearskin, busby, shako', 'beer bottle', 'beer glass', 'bell cote, bell cot', 'bib', 'bicycle-built-for-two, tandem bicycle, tandem', 'bikini, two-piece', 'binder, ring-binder', 'binoculars, field glasses, opera glasses', 'birdhouse', 'boathouse', 'bobsled, bobsleigh, bob', 'bolo tie, bolo, bola tie, bola', 'bonnet, poke bonnet', 'bookcase', 'bookshop, bookstore, bookstall', 'bottlecap', 'bow', 'bow tie, bow-tie, bowtie', 'brass, memorial tablet, plaque', 'brassiere, bra, bandeau', 'breakwater, groin, groyne, mole, bulwark, seawall, jetty', 'breastplate, aegis, egis', 'broom', 'bucket, pail', 'buckle', 'bulletproof vest', 'bullet train, bullet', 'butcher shop, meat market', 'cab, hack, taxi, taxicab', 'caldron, cauldron', 'candle, taper, wax light', 'cannon', 'canoe', 'can opener, tin opener', 'cardigan', 'car mirror', 'carousel, carrousel, merry-go-round, roundabout, whirligig', "carpenter's kit, tool kit", 'carton', 'car wheel', 'cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM', 'cassette', 'cassette player', 'castle', 'catamaran', 'CD player', 'cello, violoncello', 'cellular telephone, cellular phone, cellphone, cell, mobile phone', 'chain', 'chainlink fence', 'chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour', 'chain saw, chainsaw', 'chest', 'chiffonier, commode', 'chime, bell, gong', 'china cabinet, china closet', 'Christmas stocking', 'church, church building', 'cinema, movie theater, movie theatre, movie house, picture palace', 'cleaver, meat cleaver, chopper', 'cliff dwelling', 'cloak', 'clog, geta, patten, sabot', 'cocktail shaker', 'coffee mug', 'coffeepot', 'coil, spiral, volute, whorl, helix', 'combination lock', 'computer keyboard, keypad', 'confectionery, confectionary, candy store', 'container ship, containership, container vessel', 'convertible', 'corkscrew, bottle screw', 'cornet, horn, trumpet, trump', 'cowboy boot', 'cowboy hat, ten-gallon hat', 'cradle', 'crane', 'crash helmet', 'crate', 'crib, cot', 'Crock Pot', 'croquet ball', 'crutch', 'cuirass', 'dam, dike, dyke', 'desk', 'desktop computer', 'dial telephone, dial phone', 'diaper, nappy, napkin', 'digital clock', 'digital watch', 'dining table, board', 'dishrag, dishcloth', 'dishwasher, dish washer, dishwashing machine', 'disk brake, disc brake', 'dock, dockage, docking facility', 'dogsled, dog sled, dog sleigh', 'dome', 'doormat, welcome mat', 'drilling platform, offshore rig', 'drum, membranophone, tympan', 'drumstick', 'dumbbell', 'Dutch oven', 'electric fan, blower', 'electric guitar', 'electric locomotive', 'entertainment center', 'envelope', 'espresso maker', 'face powder', 'feather boa, boa', 'file, file cabinet, filing cabinet', 'fireboat', 'fire engine, fire truck', 'fire screen, fireguard', 'flagpole, flagstaff', 'flute, transverse flute', 'folding chair', 'football helmet', 'forklift', 'fountain', 'fountain pen', 'four-poster', 'freight car', 'French horn, horn', 'frying pan, frypan, skillet', 'fur coat', 'garbage truck, dustcart', 'gasmask, respirator, gas helmet', 'gas pump, gasoline pump, petrol pump, island dispenser', 'goblet', 'go-kart', 'golf ball', 'golfcart, golf cart', 'gondola', 'gong, tam-tam', 'gown', 'grand piano, grand', 'greenhouse, nursery, glasshouse', 'grille, radiator grille', 'grocery store, grocery, food market, market', 'guillotine', 'hair slide', 'hair spray', 'half track', 'hammer', 'hamper', 'hand blower, blow dryer, blow drier, hair dryer, hair drier', 'hand-held computer, hand-held microcomputer', 'handkerchief, hankie, hanky, hankey', 'hard disc, hard disk, fixed disk', 'harmonica, mouth organ, harp, mouth harp', 'harp', 'harvester, reaper', 'hatchet', 'holster', 'home theater, home theatre', 'honeycomb', 'hook, claw', 'hoopskirt, crinoline', 'horizontal bar, high bar', 'horse cart, horse-cart', 'hourglass', 'iPod', 'iron, smoothing iron', 'jack-o-lantern', 'jean, blue jean, denim', 'jeep, landrover', 'jersey, T-shirt, tee shirt', 'jigsaw puzzle', 'jinrikisha, ricksha, rickshaw', 'joystick', 'kimono', 'knee pad', 'knot', 'lab coat, laboratory coat', 'ladle', 'lampshade, lamp shade', 'laptop, laptop computer', 'lawn mower, mower', 'lens cap, lens cover', 'letter opener, paper knife, paperknife', 'library', 'lifeboat', 'lighter, light, igniter, ignitor', 'limousine, limo', 'liner, ocean liner', 'lipstick, lip rouge', 'Loafer', 'lotion', 'loudspeaker, speaker, speaker unit, loudspeaker system, speaker system', "loupe, jeweler's loupe", 'lumbermill, sawmill', 'magnetic compass', 'mailbag, postbag', 'mailbox, letter box', 'maillot', 'maillot, tank suit', 'manhole cover', 'maraca', 'marimba, xylophone', 'mask', 'matchstick', 'maypole', 'maze, labyrinth', 'measuring cup', 'medicine chest, medicine cabinet', 'megalith, megalithic structure', 'microphone, mike', 'microwave, microwave oven', 'military uniform', 'milk can', 'minibus', 'miniskirt, mini', 'minivan', 'missile', 'mitten', 'mixing bowl', 'mobile home, manufactured home', 'Model T', 'modem', 'monastery', 'monitor', 'moped', 'mortar', 'mortarboard', 'mosque', 'mosquito net', 'motor scooter, scooter', 'mountain bike, all-terrain bike, off-roader', 'mountain tent', 'mouse, computer mouse', 'mousetrap', 'moving van', 'muzzle', 'nail', 'neck brace', 'necklace', 'nipple', 'notebook, notebook computer', 'obelisk', 'oboe, hautboy, hautbois', 'ocarina, sweet potato', 'odometer, hodometer, mileometer, milometer', 'oil filter', 'organ, pipe organ', 'oscilloscope, scope, cathode-ray oscilloscope, CRO', 'overskirt', 'oxcart', 'oxygen mask', 'packet', 'paddle, boat paddle', 'paddlewheel, paddle wheel', 'padlock', 'paintbrush', "pajama, pyjama, pj's, jammies", 'palace', 'panpipe, pandean pipe, syrinx', 'paper towel', 'parachute, chute', 'parallel bars, bars', 'park bench', 'parking meter', 'passenger car, coach, carriage', 'patio, terrace', 'pay-phone, pay-station', 'pedestal, plinth, footstall', 'pencil box, pencil case', 'pencil sharpener', 'perfume, essence', 'Petri dish', 'photocopier', 'pick, plectrum, plectron', 'pickelhaube', 'picket fence, paling', 'pickup, pickup truck', 'pier', 'piggy bank, penny bank', 'pill bottle', 'pillow', 'ping-pong ball', 'pinwheel', 'pirate, pirate ship', 'pitcher, ewer', "plane, carpenter's plane, woodworking plane", 'planetarium', 'plastic bag', 'plate rack', 'plow, plough', "plunger, plumber's helper", 'Polaroid camera, Polaroid Land camera', 'pole', 'police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria', 'poncho', 'pool table, billiard table, snooker table', 'pop bottle, soda bottle', 'pot, flowerpot', "potter's wheel", 'power drill', 'prayer rug, prayer mat', 'printer', 'prison, prison house', 'projectile, missile', 'projector', 'puck, hockey puck', 'punching bag, punch bag, punching ball, punchball', 'purse', 'quill, quill pen', 'quilt, comforter, comfort, puff', 'racer, race car, racing car', 'racket, racquet', 'radiator', 'radio, wireless', 'radio telescope, radio reflector', 'rain barrel', 'recreational vehicle, RV, R.V.', 'reel', 'reflex camera', 'refrigerator, icebox', 'remote control, remote', 'restaurant, eating house, eating place, eatery', 'revolver, six-gun, six-shooter', 'rifle', 'rocking chair, rocker', 'rotisserie', 'rubber eraser, rubber, pencil eraser', 'rugby ball', 'rule, ruler', 'running shoe', 'safe', 'safety pin', 'saltshaker, salt shaker', 'sandal', 'sarong', 'sax, saxophone', 'scabbard', 'scale, weighing machine', 'school bus', 'schooner', 'scoreboard', 'screen, CRT screen', 'screw', 'screwdriver', 'seat belt, seatbelt', 'sewing machine', 'shield, buckler', 'shoe shop, shoe-shop, shoe store', 'shoji', 'shopping basket', 'shopping cart', 'shovel', 'shower cap', 'shower curtain', 'ski', 'ski mask', 'sleeping bag', 'slide rule, slipstick', 'sliding door', 'slot, one-armed bandit', 'snorkel', 'snowmobile', 'snowplow, snowplough', 'soap dispenser', 'soccer ball', 'sock', 'solar dish, solar collector, solar furnace', 'sombrero', 'soup bowl', 'space bar', 'space heater', 'space shuttle', 'spatula', 'speedboat', "spider web, spider's web", 'spindle', 'sports car, sport car', 'spotlight, spot', 'stage', 'steam locomotive', 'steel arch bridge', 'steel drum', 'stethoscope', 'stole', 'stone wall', 'stopwatch, stop watch', 'stove', 'strainer', 'streetcar, tram, tramcar, trolley, trolley car', 'stretcher', 'studio couch, day bed', 'stupa, tope', 'submarine, pigboat, sub, U-boat', 'suit, suit of clothes', 'sundial', 'sunglass', 'sunglasses, dark glasses, shades', 'sunscreen, sunblock, sun blocker', 'suspension bridge', 'swab, swob, mop', 'sweatshirt', 'swimming trunks, bathing trunks', 'swing', 'switch, electric switch, electrical switch', 'syringe', 'table lamp', 'tank, army tank, armored combat vehicle, armoured combat vehicle', 'tape player', 'teapot', 'teddy, teddy bear', 'television, television system', 'tennis ball', 'thatch, thatched roof', 'theater curtain, theatre curtain', 'thimble', 'thresher, thrasher, threshing machine', 'throne', 'tile roof', 'toaster', 'tobacco shop, tobacconist shop, tobacconist', 'toilet seat', 'torch', 'totem pole', 'tow truck, tow car, wrecker', 'toyshop', 'tractor', 'trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi', 'tray', 'trench coat', 'tricycle, trike, velocipede', 'trimaran', 'tripod', 'triumphal arch', 'trolleybus, trolley coach, trackless trolley', 'trombone', 'tub, vat', 'turnstile', 'typewriter keyboard', 'umbrella', 'unicycle, monocycle', 'upright, upright piano', 'vacuum, vacuum cleaner', 'vase', 'vault', 'velvet', 'vending machine', 'vestment', 'viaduct', 'violin, fiddle', 'volleyball', 'waffle iron', 'wall clock', 'wallet, billfold, notecase, pocketbook', 'wardrobe, closet, press', 'warplane, military plane', 'washbasin, handbasin, washbowl, lavabo, wash-hand basin', 'washer, automatic washer, washing machine', 'water bottle', 'water jug', 'water tower', 'whiskey jug', 'whistle', 'wig', 'window screen', 'window shade', 'Windsor tie', 'wine bottle', 'wing', 'wok', 'wooden spoon', 'wool, woolen, woollen', 'worm fence, snake fence, snake-rail fence, Virginia fence', 'wreck', 'yawl', 'yurt', 'web site, website, internet site, site', 'comic book', 'crossword puzzle, crossword', 'street sign', 'traffic light, traffic signal, stoplight', 'book jacket, dust cover, dust jacket, dust wrapper', 'menu', 'plate', 'guacamole', 'consomme', 'hot pot, hotpot', 'trifle', 'ice cream, icecream', 'ice lolly, lolly, lollipop, popsicle', 'French loaf', 'bagel, beigel', 'pretzel', 'cheeseburger', 'hotdog, hot dog, red hot', 'mashed potato', 'head cabbage', 'broccoli', 'cauliflower', 'zucchini, courgette', 'spaghetti squash', 'acorn squash', 'butternut squash', 'cucumber, cuke', 'artichoke, globe artichoke', 'bell pepper', 'cardoon', 'mushroom', 'Granny Smith', 'strawberry', 'orange', 'lemon', 'fig', 'pineapple, ananas', 'banana', 'jackfruit, jak, jack', 'custard apple', 'pomegranate', 'hay', 'carbonara', 'chocolate sauce, chocolate syrup', 'dough', 'meat loaf, meatloaf', 'pizza, pizza pie', 'potpie', 'burrito', 'red wine', 'espresso', 'cup', 'eggnog', 'alp', 'bubble', 'cliff, drop, drop-off', 'coral reef', 'geyser', 'lakeside, lakeshore', 'promontory, headland, head, foreland', 'sandbar, sand bar', 'seashore, coast, seacoast, sea-coast', 'valley, vale', 'volcano', 'ballplayer, baseball player', 'groom, bridegroom', 'scuba diver', 'rapeseed', 'daisy', "yellow lady's slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum", 'corn', 'acorn', 'hip, rose hip, rosehip', 'buckeye, horse chestnut, conker', 'coral fungus', 'agaric', 'gyromitra', 'stinkhorn, carrion fungus', 'earthstar', 'hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa', 'bolete', 'ear, spike, capitulum', 'toilet tissue, toilet paper, bathroom tissue']
['0 n01440764 鱼, tench, Tinca tinca\n', '1 n01443537 鱼, goldfish, Carassius auratus\n', '2 n01484850 鱼, great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias\n', '3 n01491361 鱼, tiger shark, Galeocerdo cuvieri\n', '4 n01494475 鱼, hammerhead, hammerhead shark\n', '5 n01496331 鱼, electric ray, crampfish, numbfish, torpedo\n', '6 n01498041 鱼, stingray\n', '7 n01514668 鸡, cock\n', '8 n01514859 鸡, hen\n', '9 n01518878 鸵鸟, ostrich, Struthio camelus\n', '10 n01530575 鸟, brambling, Fringilla montifringilla\n', '11 n01531178 鸟, goldfinch, Carduelis carduelis\n', '12 n01532829 鸟, house finch, linnet, Carpodacus mexicanus\n', '13 n01534433 鸟, junco, snowbird\n', '14 n01537544 鸟, indigo bunting, indigo finch, indigo bird, Passerina cyanea\n', '15 n01558993 鸟, robin, American robin, Turdus migratorius\n', '16 n01560419 鸟, bulbul\n', '17 n01580077 鸟, jay\n', '18 n01582220 鸟, magpie\n', '19 n01592084 鸟, chickadee\n', '20 n01601694 鸟, water ouzel, dipper\n', '21 n01608432 鸟, kite\n', '22 n01614925 鹰, bald eagle, American eagle, Haliaeetus leucocephalus\n', '23 n01616318 鹰, vulture\n', '24 n01622779 猫头鹰, great grey owl, great gray owl, Strix nebulosa\n', '25 n01629819 壁虎, European fire salamander, Salamandra salamandra\n', '26 n01630670 壁虎, common newt, Triturus vulgaris\n', '27 n01631663 壁虎, eft\n', '28 n01632458 壁虎, spotted salamander, Ambystoma maculatum\n', '29 n01632777 壁虎, axolotl, mud puppy, Ambystoma mexicanum\n', '30 n01641577 蛤蟆, bullfrog, Rana catesbeiana\n', '31 n01644373 青蛙, tree frog, tree-frog\n', '32 n01644900 青蛙, tailed frog, bell toad, ribbed toad, tailed toad, Ascaphus trui\n', '33 n01664065 龟, loggerhead, loggerhead turtle, Caretta caretta\n', '34 n01665541 龟, leatherback turtle, leatherback, leathery turtle, Dermochelys coriacea\n', '35 n01667114 龟, mud turtle\n', '36 n01667778 龟, terrapin\n', '37 n01669191 龟, box turtle, box tortoise\n', '38 n01675722 蜥蜴, banded gecko\n', '39 n01677366 蜥蜴, common iguana, iguana, Iguana iguana\n', '40 n01682714 蜥蜴, American chameleon, anole, Anolis carolinensis\n', '41 n01685808 蜥蜴, whiptail, whiptail lizard\n', '42 n01687978 蜥蜴, agama\n', '43 n01688243 蜥蜴, frilled lizard, Chlamydosaurus kingi\n', '44 n01689811 蜥蜴, alligator lizard\n', '45 n01692333 蜥蜴, Gila monster, Heloderma suspectum\n', '46 n01693334 蜥蜴, green lizard, Lacerta viridis\n', '47 n01694178 蜥蜴, African chameleon, Chamaeleo chamaeleon\n', '48 n01695060 蜥蜴, Komodo dragon, Komodo lizard, dragon lizard, giant lizard, Varanus komodoensis\n', '49 n01697457 鳄鱼, African crocodile, Nile crocodile, Crocodylus niloticus\n', '50 n01698640 鳄鱼, American alligator, Alligator mississipiensis\n', '51 n01704323 恐龙, triceratops\n', '52 n01728572 蛇, thunder snake, worm snake, Carphophis amoenus\n', '53 n01728920 蛇, ringneck snake, ring-necked snake, ring snake\n', '54 n01729322 蛇, hognose snake, puff adder, sand viper\n', '55 n01729977 蛇, green snake, grass snake\n', '56 n01734418 蛇, king snake, kingsnake\n', '57 n01735189 蛇, garter snake, grass snake\n', '58 n01737021 蛇, water snake\n', '59 n01739381 蛇, vine snake\n', '60 n01740131 蛇, night snake, Hypsiglena torquata\n', '61 n01742172 蛇, boa constrictor, Constrictor constrictor\n', '62 n01744401 蛇, rock python, rock snake, Python sebae\n', '63 n01748264 蛇, Indian cobra, Naja naja\n', '64 n01749939 蛇, green mamba\n', '65 n01751748 蛇, sea snake\n', '66 n01753488 蛇, horned viper, cerastes, sand viper, horned asp, Cerastes cornutus\n', '67 n01755581 蛇, diamondback, diamondback rattlesnake, Crotalus adamanteus\n', '68 n01756291 蛇, sidewinder, horned rattlesnake, Crotalus cerastes\n', '69 n01768244 化石, trilobite\n', '70 n01770081 蜘蛛, harvestman, daddy longlegs, Phalangium opilio\n', '71 n01770393 蝎子, scorpion\n', '72 n01773157 蜘蛛, black and gold garden spider, Argiope aurantia\n', '73 n01773549 蜘蛛, barn spider, Araneus cavaticus\n', '74 n01773797 蜘蛛, garden spider, Aranea diademata\n', '75 n01774384 蜘蛛, black widow, Latrodectus mactans\n', '76 n01774750 蜘蛛, tarantula\n', '77 n01775062 蜘蛛, wolf spider, hunting spider\n', '78 n01776313 蜘蛛, tick\n', '79 n01784675 蜈蚣, centipede\n', '80 n01795545 鸟, black grouse\n', '81 n01796340 鸟, ptarmigan\n', '82 n01797886 鸟, ruffed grouse, partridge, Bonasa umbellus\n', '83 n01798484 鸟, prairie chicken, prairie grouse, prairie fowl\n', '84 n01806143 孔雀, peacock\n', '85 n01806567 鸟, quail\n', '86 n01807496 鸟, partridge\n', '87 n01817953 鸟, African grey, African gray, Psittacus erithacus\n', '88 n01818515 鸟, macaw\n', '89 n01819313 鸟, sulphur-crested cockatoo, Kakatoe galerita, Cacatua galerita\n', '90 n01820546 鸟, lorikeet\n', '91 n01824575 鸟, coucal\n', '92 n01828970 鸟, bee eater\n', '93 n01829413 鸟, hornbill\n', '94 n01833805 鸟, hummingbird\n', '95 n01843065 鸟, jacamar\n', '96 n01843383 鸟, toucan\n', '97 n01847000 鸭子, drake\n', '98 n01855032 鹅, red-breasted merganser, Mergus serrator\n', '99 n01855672 鹅, goose\n', '100 n01860187 鹅, black swan, Cygnus atratus\n', '101 n01871265 大象, tusker\n', '102 n01872401 刺猬, echidna, spiny anteater, anteater\n', '103 n01873310 鸭嘴兽, platypus, duckbill, duckbilled platypus, duck-billed platypus, Ornithorhynchus anatinus\n', '104 n01877812 袋鼠, wallaby, brush kangaroo\n', '105 n01882714 考拉, koala, koala bear, kangaroo bear, native bear, Phascolarctos cinereus\n', '106 n01883070 土拨鼠, wombat\n', '107 n01910747 水母, jellyfish\n', '108 n01914609 珊瑚, sea anemone, anemone\n', '109 n01917289 珊瑚, brain coral\n', '110 n01924916 海洋生物, flatworm, platyhelminth\n', '111 n01930112 海蛇, nematode, nematode worm, roundworm\n', '112 n01943899 海螺, conch\n', '113 n01944390 蜗牛, snail\n', '114 n01945685 蜗牛, slug\n', '115 n01950731 海洋生物, sea slug, nudibranch\n', '116 n01955084 海洋生物, chiton, coat-of-mail shell, sea cradle, polyplacophore\n', '117 n01968897 海螺, chambered nautilus, pearly nautilus, nautilus\n', '118 n01978287 螃蟹, Dungeness crab, Cancer magister\n', '119 n01978455 螃蟹, rock crab, Cancer irroratus\n', '120 n01980166 螃蟹, fiddler crab\n', '121 n01981276 螃蟹, king crab, Alaska crab, Alaskan king crab, Alaska king crab, Paralithodes camtschatica\n', '122 n01983481 龙虾, American lobster, Northern lobster, Maine lobster, Homarus americanus\n', '123 n01984695 龙虾, spiny lobster, langouste, rock lobster, crawfish, crayfish, sea crawfish\n', '124 n01985128 龙虾, crayfish, crawfish, crawdad, crawdaddy\n', '125 n01986214 寄居蟹, hermit crab\n', '126 n01990800 海洋生物, isopod\n', '127 n02002556 鸟, white stork, Ciconia ciconia\n', '128 n02002724 鸟, black stork, Ciconia nigra\n', '129 n02006656 鸟, spoonbill\n', '130 n02007558 鸟, flamingo\n', '131 n02009229 鸟, little blue heron, Egretta caerulea\n', '132 n02009912 鸟, American egret, great white heron, Egretta albus\n', '133 n02011460 鸟, bittern\n', '134 n02012849 鸟, crane\n', '135 n02013706 鸟, limpkin, Aramus pictus\n', '136 n02017213 鸟, European gallinule, Porphyrio porphyrio\n', '137 n02018207 鸟, American coot, marsh hen, mud hen, water hen, Fulica americana\n', '138 n02018795 鸟, bustard\n', '139 n02025239 鸟, ruddy turnstone, Arenaria interpres\n', '140 n02027492 鸟, red-backed sandpiper, dunlin, Erolia alpina\n', '141 n02028035 鸟, redshank, Tringa totanus\n', '142 n02033041 鸟, dowitcher\n', '143 n02037110 鸟, oystercatcher, oyster catcher\n', '144 n02051845 鸟, pelican\n', '145 n02056570 企鹅, king penguin, Aptenodytes patagonica\n', '146 n02058221 鸟, albatross, mollymawk\n', '147 n02066245 鲸鱼, grey whale, gray whale, devilfish, Eschrichtius gibbosus, Eschrichtius robustus\n', '148 n02071294 鲸鱼, killer whale, killer, orca, grampus, sea wolf, Orcinus orca\n', '149 n02074367 海象, dugong, Dugong dugon\n', '150 n02077923 海狮, sea lion\n', '151 n02085620 狗, Chihuahua\n', '152 n02085782 狗, Japanese spaniel\n', '153 n02085936 狗, Maltese dog, Maltese terrier, Maltese\n', '154 n02086079 狗, Pekinese, Pekingese, Peke\n', '155 n02086240 狗, Shih-Tzu\n', '156 n02086646 狗, Blenheim spaniel\n', '157 n02086910 狗, papillon\n', '158 n02087046 狗, toy terrier\n', '159 n02087394 狗, Rhodesian ridgeback\n', '160 n02088094 狗, Afghan hound, Afghan\n', '161 n02088238 狗, basset, basset hound\n', '162 n02088364 狗, beagle\n', '163 n02088466 狗, bloodhound, sleuthhound\n', '164 n02088632 狗, bluetick\n', '165 n02089078 狗, black-and-tan coonhound\n', '166 n02089867 狗, Walker hound, Walker foxhound\n', '167 n02089973 狗, English foxhound\n', '168 n02090379 狗, redbone\n', '169 n02090622 狗, borzoi, Russian wolfhound\n', '170 n02090721 狗, Irish wolfhound\n', '171 n02091032 狗, Italian greyhound\n', '172 n02091134 狗, whippet\n', '173 n02091244 狗, Ibizan hound, Ibizan Podenco\n', '174 n02091467 狗, Norwegian elkhound, elkhound\n', '175 n02091635 狗, otterhound, otter hound\n', '176 n02091831 狗, Saluki, gazelle hound\n', '177 n02092002 狗, Scottish deerhound, deerhound\n', '178 n02092339 狗, Weimaraner\n', '179 n02093256 狗, Staffordshire bullterrier, Staffordshire bull terrier\n', '180 n02093428 狗, American Staffordshire terrier, Staffordshire terrier, American pit bull terrier, pit bull terrier\n', '181 n02093647 狗, Bedlington terrier\n', '182 n02093754 狗, Border terrier\n', '183 n02093859 狗, Kerry blue terrier\n', '184 n02093991 狗, Irish terrier\n', '185 n02094114 狗, Norfolk terrier\n', '186 n02094258 狗, Norwich terrier\n', '187 n02094433 狗, Yorkshire terrier\n', '188 n02095314 狗, wire-haired fox terrier\n', '189 n02095570 狗, Lakeland terrier\n', '190 n02095889 狗, Sealyham terrier, Sealyham\n', '191 n02096051 狗, Airedale, Airedale terrier\n', '192 n02096177 狗, cairn, cairn terrier\n', '193 n02096294 狗, Australian terrier\n', '194 n02096437 狗, Dandie Dinmont, Dandie Dinmont terrier\n', '195 n02096585 狗, Boston bull, Boston terrier\n', '196 n02097047 狗, miniature schnauzer\n', '197 n02097130 狗, giant schnauzer\n', '198 n02097209 狗, standard schnauzer\n', '199 n02097298 狗, Scotch terrier, Scottish terrier, Scottie\n', '200 n02097474 狗, Tibetan terrier, chrysanthemum dog\n', '201 n02097658 狗, silky terrier, Sydney silky\n', '202 n02098105 狗, soft-coated wheaten terrier\n', '203 n02098286 狗, West Highland white terrier\n', '204 n02098413 狗, Lhasa, Lhasa apso\n', '205 n02099267 狗, flat-coated retriever\n', '206 n02099429 狗, curly-coated retriever\n', '207 n02099601 狗, golden retriever\n', '208 n02099712 狗, Labrador retriever\n', '209 n02099849 狗, Chesapeake Bay retriever\n', '210 n02100236 狗, German short-haired pointer\n', '211 n02100583 狗, vizsla, Hungarian pointer\n', '212 n02100735 狗, English setter\n', '213 n02100877 狗, Irish setter, red setter\n', '214 n02101006 狗, Gordon setter\n', '215 n02101388 狗, Brittany spaniel\n', '216 n02101556 狗, clumber, clumber spaniel\n', '217 n02102040 狗, English springer, English springer spaniel\n', '218 n02102177 狗, Welsh springer spaniel\n', '219 n02102318 狗, cocker spaniel, English cocker spaniel, cocker\n', '220 n02102480 狗, Sussex spaniel\n', '221 n02102973 狗, Irish water spaniel\n', '222 n02104029 狗, kuvasz\n', '223 n02104365 狗, schipperke\n', '224 n02105056 狗, groenendael\n', '225 n02105162 狗, malinois\n', '226 n02105251 狗, briard\n', '227 n02105412 狗, kelpie\n', '228 n02105505 狗, komondor\n', '229 n02105641 狗, Old English sheepdog, bobtail\n', '230 n02105855 狗, Shetland sheepdog, Shetland sheep dog, Shetland\n', '231 n02106030 狗, collie\n', '232 n02106166 狗, Border collie\n', '233 n02106382 狗, Bouvier des Flandres, Bouviers des Flandres\n', '234 n02106550 狗, Rottweiler\n', '235 n02106662 狗, German shepherd, German shepherd dog, German police dog, alsatian\n', '236 n02107142 狗, Doberman, Doberman pinscher\n', '237 n02107312 狗, miniature pinscher\n', '238 n02107574 狗, Greater Swiss Mountain dog\n', '239 n02107683 狗, Bernese mountain dog\n', '240 n02107908 狗, Appenzeller\n', '241 n02108000 狗, EntleBucher\n', '242 n02108089 狗, boxer\n', '243 n02108422 狗, bull mastiff\n', '244 n02108551 狗, Tibetan mastiff\n', '245 n02108915 狗, French bulldog\n', '246 n02109047 狗, Great Dane\n', '247 n02109525 狗, Saint Bernard, St Bernard\n', '248 n02109961 狗, Eskimo dog, husky\n', '249 n02110063 狗, malamute, malemute, Alaskan malamute\n', '250 n02110185 狗, Siberian husky\n', '251 n02110341 狗, dalmatian, coach dog, carriage dog\n', '252 n02110627 狗, affenpinscher, monkey pinscher, monkey dog\n', '253 n02110806 狗, basenji\n', '254 n02110958 狗, pug, pug-dog\n', '255 n02111129 狗, Leonberg\n', '256 n02111277 狗, Newfoundland, Newfoundland dog\n', '257 n02111500 狗, Great Pyrenees\n', '258 n02111889 狗, Samoyed, Samoyede\n', '259 n02112018 狗, Pomeranian\n', '260 n02112137 狗, chow, chow chow\n', '261 n02112350 狗, keeshond\n', '262 n02112706 狗, Brabancon griffon\n', '263 n02113023 狗, Pembroke, Pembroke Welsh corgi\n', '264 n02113186 狗, Cardigan, Cardigan Welsh corgi\n', '265 n02113624 狗, toy poodle\n', '266 n02113712 狗, miniature poodle\n', '267 n02113799 狗, standard poodle\n', '268 n02113978 狗, Mexican hairless\n', '269 n02114367 狼, timber wolf, grey wolf, gray wolf, Canis lupus\n', '270 n02114548 狼, white wolf, Arctic wolf, Canis lupus tundrarum\n', '271 n02114712 狼, red wolf, maned wolf, Canis rufus, Canis niger\n', '272 n02114855 狼, coyote, prairie wolf, brush wolf, Canis latrans\n', '273 n02115641 狼, dingo, warrigal, warragal, Canis dingo\n', '274 n02115913 狼, dhole, Cuon alpinus\n', '275 n02116738 狼, African hunting dog, hyena dog, Cape hunting dog, Lycaon pictus\n', '276 n02117135 狼, hyena, hyaena\n', '277 n02119022 狐狸, red fox, Vulpes vulpes\n', '278 n02119789 狐狸, kit fox, Vulpes macrotis\n', '279 n02120079 狐狸, Arctic fox, white fox, Alopex lagopus\n', '280 n02120505 狐狸, grey fox, gray fox, Urocyon cinereoargenteus\n', '281 n02123045 猫, tabby, tabby cat\n', '282 n02123159 猫, tiger cat\n', '283 n02123394 猫, Persian cat\n', '284 n02123597 猫, Siamese cat, Siamese\n', '285 n02124075 猫, Egyptian cat\n', '286 n02125311 猫, cougar, puma, catamount, mountain lion, painter, panther, Felis concolor\n', '287 n02127052 猫, lynx, catamount\n', '288 n02128385 豹, leopard, Panthera pardus\n', '289 n02128757 豹, snow leopard, ounce, Panthera uncia\n', '290 n02128925 豹, jaguar, panther, Panthera onca, Felis onca\n', '291 n02129165 狮子, lion, king of beasts, Panthera leo\n', '292 n02129604 老虎, tiger, Panthera tigris\n', '293 n02130308 豹, cheetah, chetah, Acinonyx jubatus\n', '294 n02132136 熊, brown bear, bruin, Ursus arctos\n', '295 n02133161 熊, American black bear, black bear, Ursus americanus, Euarctos americanus\n', '296 n02134084 熊, ice bear, polar bear, Ursus Maritimus, Thalarctos maritimus\n', '297 n02134418 熊, sloth bear, Melursus ursinus, Ursus ursinus\n', '298 n02137549 猫鼬, mongoose\n', '299 n02138441 猫鼬, meerkat, mierkat\n', '300 n02165105 昆虫, tiger beetle\n', '301 n02165456 昆虫, ladybug, ladybeetle, lady beetle, ladybird, ladybird beetle\n', '302 n02167151 昆虫, ground beetle, carabid beetle\n', '303 n02168699 昆虫, long-horned beetle, longicorn, longicorn beetle\n', '304 n02169497 昆虫, leaf beetle, chrysomelid\n', '305 n02172182 昆虫, dung beetle\n', '306 n02174001 昆虫, rhinoceros beetle\n', '307 n02177972 昆虫, weevil\n', '308 n02190166 昆虫, fly\n', '309 n02206856 昆虫, bee\n', '310 n02219486 昆虫, ant, emmet, pismire\n', '311 n02226429 昆虫, grasshopper, hopper\n', '312 n02229544 昆虫, cricket\n', '313 n02231487 昆虫, walking stick, walkingstick, stick insect\n', '314 n02233338 昆虫, cockroach, roach\n', '315 n02236044 昆虫, mantis, mantid\n', '316 n02256656 昆虫, cicada, cicala\n', '317 n02259212 昆虫, leafhopper\n', '318 n02264363 昆虫, lacewing, lacewing fly\n', '319 n02268443 蜻蜓, dragonfly, darning needle, devil’s darning needle, sewing needle, snake feeder, snake doctor, mosquito hawk, skeeter hawk\n', '320 n02268853 蜻蜓, damselfly\n', '321 n02276258 蝴蝶, admiral\n', '322 n02277742 蝴蝶, ringlet, ringlet butterfly\n', '323 n02279972 蝴蝶, monarch, monarch butterfly, milkweed butterfly, Danaus plexippus\n', '324 n02280649 蝴蝶, cabbage butterfly\n', '325 n02281406 蝴蝶, sulphur butterfly, sulfur butterfly\n', '326 n02281787 蝴蝶, lycaenid, lycaenid butterfly\n', '327 n02317335 海星, starfish, sea star\n', '328 n02319095 海胆, sea urchin\n', '329 n02321529 海洋生物, sea cucumber, holothurian\n', '330 n02325366 兔子, wood rabbit, cottontail, cottontail rabbit\n', '331 n02326432 兔子, hare\n', '332 n02328150 兔子, Angora, Angora rabbit\n', '333 n02342885 鼠, hamster\n', '334 n02346627 鼠, porcupine, hedgehog\n', '335 n02356798 松鼠, fox squirrel, eastern fox squirrel, Sciurus niger\n', '336 n02361337 鼠, marmot\n', '337 n02363005 鼠, beaver\n', '338 n02364673 鼠, guinea pig, Cavia cobaya\n', '339 n02389026 马, sorrel\n', '340 n02391049 斑马, zebra\n', '341 n02395406 猪, hog, pig, grunter, squealer, Sus scrofa\n', '342 n02396427 猪, wild boar, boar, Sus scrofa\n', '343 n02397096 猪, warthog\n', '344 n02398521 河马, hippopotamus, hippo, river horse, Hippopotamus amphibius\n', '345 n02403003 牛, ox\n', '346 n02408429 牛, water buffalo, water ox, Asiatic buffalo, Bubalus bubalis\n', '347 n02410509 牛, bison\n', '348 n02412080 羊, ram, tup\n', '349 n02415577 羊, bighorn, bighorn sheep, cimarron, Rocky Mountain bighorn, Rocky Mountain sheep, Ovis canadensis\n', '350 n02417914 羊, ibex, Capra ibex\n', '351 n02422106 羊, hartebeest\n', '352 n02422699 羊, impala, Aepyceros melampus\n', '353 n02423022 羊, gazelle\n', '354 n02437312 骆驼, Arabian camel, dromedary, Camelus dromedarius\n', '355 n02437616 羊驼, llama\n', '356 n02441942 狸, weasel\n', '357 n02442845 狸, mink\n', '358 n02443114 狸, polecat, fitch, foulmart, foumart, Mustela putorius\n', '359 n02443484 狸, black-footed ferret, ferret, Mustela nigripes\n', '360 n02444819 狸, otter\n', '361 n02445715 狸, skunk, polecat, wood pussy\n', '362 n02447366 狸, badger\n', '363 n02454379 穿山甲, armadillo\n', '364 n02457408 树懒, three-toed sloth, ai, Bradypus tridactylus\n', '365 n02480495 狒狒, orangutan, orang, orangutang, Pongo pygmaeus\n', '366 n02480855 猩猩, gorilla, Gorilla gorilla\n', '367 n02481823 猴子, chimpanzee, chimp, Pan troglodytes\n', '368 n02483362 猴子, gibbon, Hylobates lar\n', '369 n02483708 猴子, siamang, Hylobates syndactylus, Symphalangus syndactylus\n', '370 n02484975 猴子, guenon, guenon monkey\n', '371 n02486261 猴子, patas, hussar monkey, Erythrocebus patas\n', '372 n02486410 猴子, baboon\n', '373 n02487347 猴子, macaque\n', '374 n02488291 猴子, langur\n', '375 n02488702 猴子, colobus, colobus monkey\n', '376 n02489166 猴子, proboscis monkey, Nasalis larvatus\n', '377 n02490219 猴子, marmoset\n', '378 n02492035 猴子, capuchin, ringtail, Cebus capucinus\n', '379 n02492660 猴子, howler monkey, howler\n', '380 n02493509 猴子, titi, titi monkey\n', '381 n02493793 猴子, spider monkey, Ateles geoffroyi\n', '382 n02494079 猴子, squirrel monkey, Saimiri sciureus\n', '383 n02497673 猴子, Madagascar cat, ring-tailed lemur, Lemur catta\n', '384 n02500267 猴子, indri, indris, Indri indri, Indri brevicaudatus\n', '385 n02504013 大象, Indian elephant, Elephas maximus\n', '386 n02504458 大象, African elephant, Loxodonta africana\n', '387 n02509815 浣熊, lesser panda, red panda, panda, bear cat, cat bear, Ailurus fulgens\n', '388 n02510455 熊猫, giant panda, panda, panda bear, coon bear, Ailuropoda melanoleuca\n', '389 n02514041 鱼, barracouta, snoek\n', '390 n02526121 鱼, eel\n', '391 n02536864 鱼, coho, cohoe, coho salmon, blue jack, silver salmon, Oncorhynchus kisutch\n', '392 n02606052 鱼, rock beauty, Holocanthus tricolor\n', '393 n02607072 鱼, anemone fish\n', '394 n02640242 鱼, sturgeon\n', '395 n02641379 鱼, gar, garfish, garpike, billfish, Lepisosteus osseus\n', '396 n02643566 鱼, lionfish\n', '397 n02655020 鱼, puffer, pufferfish, blowfish, globefish\n', '398 n02666196 算盘, abacus\n', '399 n02667093 穆斯林, abaya\n', '400 n02669723 学士服, academic gown, academic robe, judge’s robe\n', '401 n02672831 手风琴, accordion, piano accordion, squeeze box\n', '402 n02676566 吉他, acoustic guitar\n', '403 n02687172 航空母舰, aircraft carrier, carrier, flattop, attack aircraft carrier\n', '404 n02690373 飞机, airliner\n', '405 n02692877 飞艇, airship, dirigible\n', '406 n02699494 教堂, altar\n', '407 n02701002 救护车 check, ambulance\n', '408 n02704792 水陆两用车 check, amphibian, amphibious vehicle\n', '409 n02708093 钟, analog clock\n', '410 n02727426 箱子, apiary, bee house\n', '411 n02730930 围裙, apron\n', '412 n02747177 垃圾箱, ashcan, trash can, garbage can, wastebin, ash bin, ash-bin, ashbin, dustbin, trash barrel, trash bin\n', '413 n02749479 枪, assault rifle, assault gun\n', '414 n02769748 背包, backpack, back pack, knapsack, packsack, rucksack, haversack\n', '415 n02776631 面包柜, bakery, bakeshop, bakehouse\n', '416 n02777292 体操, balance beam, beam\n', '417 n02782093 热气球, balloon\n', '418 n02783161 钢笔, ballpoint, ballpoint pen, ballpen, Biro\n', '419 n02786058 邦迪, Band Aid\n', '420 n02787622 乐器, banjo\n', '421 n02788148 楼梯, bannister, banister, balustrade, balusters, handrail\n', '422 n02790996 杠铃, barbell\n', '423 n02791124 座椅, barber chair\n', '424 n02791270 理发, barbershop\n', '425 n02793495 木屋, barn\n', '426 n02794156 表, barometer\n', '427 n02795169 酒桶, barrel, cask\n', '428 n02797295 手推车, barrow, garden cart, lawn cart, wheelbarrow\n', '429 n02799071 棒球, baseball\n', '430 n02802426 篮球, basketball\n', '431 n02804414 婴儿, bassinet\n', '432 n02804610 乐器, bassoon\n', '433 n02807133 游泳, bathing cap, swimming cap\n', '434 n02808304 婴儿毛巾, bath towel\n', '435 n02808440 浴缸, bathtub, bathing tub, bath, tub\n', '436 n02814533 轿车 check, beach wagon, station wagon, wagon, estate car, beach waggon, station waggon, waggon\n', '437 n02814860 灯塔, beacon, lighthouse, beacon light, pharos\n', '438 n02815834 烧杯, beaker\n', '439 n02817516 守卫, bearskin, busby, shako\n', '440 n02823428 啤酒, beer bottle\n', '441 n02823750 啤酒, beer glass\n', '442 n02825657 建筑, bell cote, bell cot\n', '443 n02834397 围兜, bib\n', '444 n02835271 双人自行车, bicycle-built-for-two, tandem bicycle, tandem\n', '445 n02837789 比基尼, bikini, two-piece\n', '446 n02840245 笔记本, binder, ring-binder\n', '447 n02841315 望远镜, binoculars, field glasses, opera glasses\n', '448 n02843684 信箱, birdhouse\n', '449 n02859443 小屋, boathouse\n', '450 n02860847 雪橇, bobsled, bobsleigh, bob\n', '451 n02865351 项链, bolo tie, bolo, bola tie, bola\n', '452 n02869837 帽子, bonnet, poke bonnet\n', '453 n02870880 书柜, bookcase\n', '454 n02871525 书店, bookshop, bookstore, bookstall\n', '455 n02877765 瓶盖, bottlecap\n', '456 n02879718 弓箭, bow\n', '457 n02883205 领结, bow tie, bow-tie, bowtie\n', '458 n02892201 墓碑, brass, memorial tablet, plaque\n', '459 n02892767 胸罩, brassiere, bra, bandeau\n', '460 n02894605 海岸, breakwater, groin, groyne, mole, bulwark, seawall, jetty\n', '461 n02895154 盔甲, breastplate, aegis, egis\n', '462 n02906734 扫帚, broom\n', '463 n02909870 水桶, bucket, pail\n', '464 n02910353 皮带, buckle\n', '465 n02916936 防弹背心, bulletproof vest\n', '466 n02917067 火车, bullet train, bullet\n', '467 n02927161 肉铺, butcher shop, meat market\n', '468 n02930766 出租车 check, cab, hack, taxi, taxicab\n', '469 n02939185 锅, caldron, cauldron\n', '470 n02948072 蜡烛, candle, taper, wax light\n', '471 n02950826 炮, cannon\n', '472 n02951358 艇, canoe\n', '473 n02951585 订书机, can opener, tin opener\n', '474 n02963159 毛衣, cardigan\n', '475 n02965783 反光镜, car mirror\n', '476 n02966193 旋转木马, carousel, carrousel, merry-go-round, roundabout, whirligig\n', '477 n02966687 工具箱, carpenter’s kit, tool kit\n', '478 n02971356 盒子, carton\n', '479 n02974003 轮胎, car wheel\n', '480 n02977058 取款机, cash machine, cash dispenser, automated teller machine, automatic teller machine, automated teller, automatic teller, ATM\n', '481 n02978881 磁带, cassette\n', '482 n02979186 磁带, cassette player\n', '483 n02980441 城堡, castle\n', '484 n02981792 帆船, catamaran\n', '485 n02988304 cd播放器, CD player\n', '486 n02992211 大提琴, cello, violoncello\n', '487 n02992529 手机, cellular telephone, cellular phone, cellphone, cell, mobile phone\n', '488 n02999410 铁链, chain\n', '489 n03000134 铁丝网, chainlink fence\n', '490 n03000247 铁丝网, chain mail, ring mail, mail, chain armor, chain armour, ring armor, ring armour\n', '491 n03000684 电锯, chain saw, chainsaw\n', '492 n03014705 木箱, chest\n', '493 n03016953 木柜, chiffonier, commode\n', '494 n03017168 锣鼓, chime, bell, gong\n', '495 n03018349 柜子, china cabinet, china closet\n', '496 n03026506 袜子, Christmas stocking\n', '497 n03028079 教堂, church, church building\n', '498 n03032252 剧院, cinema, movie theater, movie theatre, movie house, picture palace\n', '499 n03041632 刀, cleaver, meat cleaver, chopper\n', '500 n03042490 堡垒, cliff dwelling\n', '501 n03045698 斗篷, cloak\n', '502 n03047690 鞋子, clog, geta, patten, sabot\n', '503 n03062245 瓶子, cocktail shaker\n', '504 n03063599 杯子, coffee mug\n', '505 n03063689 壶, coffeepot\n', '506 n03065424 螺旋, coil, spiral, volute, whorl, helix\n', '507 n03075370 锁, combination lock\n', '508 n03085013 键盘, computer keyboard, keypad\n', '509 n03089624 糖果, confectionery, confectionary, candy store\n', '510 n03095699 船, container ship, containership, container vessel\n', '511 n03100240 轿车 check, convertible\n', '512 n03109150 开瓶器, corkscrew, bottle screw\n', '513 n03110669 号(乐器), cornet, horn, trumpet, trump\n', '514 n03124043 靴子, cowboy boot\n', '515 n03124170 帽子, cowboy hat, ten-gallon hat\n', '516 n03125729 婴儿床, cradle\n', '517 n03126707 起重机, crane\n', '518 n03127747 头盔, crash helmet\n', '519 n03127925 木箱, crate\n', '520 n03131574 婴儿床, crib, cot\n', '521 n03133878 电饭锅, Crock Pot\n', '522 n03134739 推球, croquet ball\n', '523 n03141823 拐杖, crutch\n', '524 n03146219 盔甲, cuirass\n', '525 n03160309 水库, dam, dike, dyke\n', '526 n03179701 办公桌, desk\n', '527 n03180011 电脑, desktop computer\n', '528 n03187595 电话机, dial telephone, dial phone\n', '529 n03188531 尿布, diaper, nappy, napkin\n', '530 n03196217 闹钟, digital clock\n', '531 n03197337 手表, digital watch\n', '532 n03201208 餐桌, dining table, board\n', '533 n03207743 垫子, dishrag, dishcloth\n', '534 n03207941 洗碗柜, dishwasher, dish washer, dishwashing machine\n', '535 n03208938 车轮, disk brake, disc brake\n', '536 n03216828 港口, dock, dockage, docking facility\n', '537 n03218198 雪橇, dogsled, dog sled, dog sleigh\n', '538 n03220513 穹顶, dome\n', '539 n03223299 地毯, doormat, welcome mat\n', '540 n03240683 油田, drilling platform, offshore rig\n', '541 n03249569 鼓, drum, membranophone, tympan\n', '542 n03250847 鼓棒, drumstick\n', '543 n03255030 哑铃, dumbbell\n', '544 n03259280 锅, Dutch oven\n', '545 n03271574 风扇, electric fan, blower\n', '546 n03272010 电吉他, electric guitar\n', '547 n03272562 火车 check, electric locomotive\n', '548 n03290653 电视机, entertainment center\n', '549 n03291819 信, envelope\n', '550 n03297495 咖啡机, espresso maker\n', '551 n03314780 化妆品, face powder\n', '552 n03325584 绒毛, feather boa, boa\n', '553 n03337140 柜子, file, file cabinet, filing cabinet\n', '554 n03344393 喷泉, fireboat\n', '555 n03345487 消防车 check, fire engine, fire truck\n', '556 n03347037 壁炉, fire screen, fireguard\n', '557 n03355925 旗杆, flagpole, flagstaff\n', '558 n03372029 笛子, flute, transverse flute\n', '559 n03376595 座椅, folding chair\n', '560 n03379051 橄榄球, football helmet\n', '561 n03384352 叉车, forklift\n', '562 n03388043 喷泉, fountain\n', '563 n03388183 钢笔, fountain pen\n', '564 n03388549 床, four-poster\n', '565 n03393912 火车, freight car\n', '566 n03394916 圆号, French horn, horn\n', '567 n03400231 平底锅, frying pan, frypan, skillet\n', '568 n03404251 裘皮, fur coat\n', '569 n03417042 卡车 check, garbage truck, dustcart\n', '570 n03424325 面具, gasmask, respirator, gas helmet\n', '571 n03425413 加油, gas pump, gasoline pump, petrol pump, island dispenser\n', '572 n03443371 酒杯, goblet\n', '573 n03444034 卡丁车, go-kart\n', '574 n03445777 高尔夫, golf ball\n', '575 n03445924 高尔夫车, golfcart, golf cart\n', '576 n03447447 小船, gondola\n', '577 n03447721 锣鼓, gong, tam-tam\n', '578 n03450230 婚纱, gown\n', '579 n03452741 钢琴, grand piano, grand\n', '580 n03457902 大棚, greenhouse, nursery, glasshouse\n', '581 n03459775 轿车 车标 check, grille, radiator grille\n', '582 n03461385 菜场, grocery store, grocery, food market, market\n', '583 n03467068 断头台, guillotine\n', '584 n03476684 发饰, hair slide\n', '585 n03476991 发蜡, hair spray\n', '586 n03478589 坦克, half track\n', '587 n03481172 榔头, hammer\n', '588 n03482405 竹筒, hamper\n', '589 n03483316 吹风机, hand blower, blow dryer, blow drier, hair dryer, hair drier\n', '590 n03485407 pos机, hand-held computer, hand-held microcomputer\n', '591 n03485794 手帕, handkerchief, hankie, hanky, hankey\n', '592 n03492542 硬盘, hard disc, hard disk, fixed disk\n', '593 n03494278 口风琴, harmonica, mouth organ, harp, mouth harp\n', '594 n03495258 竖琴, harp\n', '595 n03496892 起重机, harvester, reaper\n', '596 n03498962 斧头, hatchet\n', '597 n03527444 手枪, holster\n', '598 n03529860 电视机, home theater, home theatre\n', '599 n03530642 蜂巢, honeycomb\n', '600 n03532672 钩子, hook, claw\n', '601 n03534580 裙子, hoopskirt, crinoline\n', '602 n03535780 体操, horizontal bar, high bar\n', '603 n03538406 马车, horse cart, horse-cart\n', '604 n03544143 沙漏, hourglass\n', '605 n03584254 音乐播放器, iPod\n', '606 n03584829 电熨斗, iron, smoothing iron\n', '607 n03590841 南瓜灯, jack-o’-lantern\n', '608 n03594734 牛仔裤, jean, blue jean, denim\n', '609 n03594945 吉普车 check, jeep, landrover\n', '610 n03595614 T恤, jersey, T-shirt, tee shirt\n', '611 n03598930 拼图, jigsaw puzzle\n', '612 n03599486 黄包车, jinrikisha, ricksha, rickshaw\n', '613 n03602883 操纵杆, joystick\n', '614 n03617480 和服, kimono\n', '615 n03623198 护具, knee pad\n', '616 n03627232 绳结, knot\n', '617 n03630383 医生, lab coat, laboratory coat\n', '618 n03633091 勺子, ladle\n', '619 n03637318 灯, lampshade, lamp shade\n', '620 n03642806 笔记本电脑, laptop, laptop computer\n', '621 n03649909 割草机, lawn mower, mower\n', '622 n03657121 镜头盖, lens cap, lens cover\n', '623 n03658185 小刀, letter opener, paper knife, paperknife\n', '624 n03661043 图书馆, library\n', '625 n03662601 救生船, lifeboat\n', '626 n03666591 打火机, lighter, light, igniter, ignitor\n', '627 n03670208 加长车 check, limousine, limo\n', '628 n03673027 轮船, liner, ocean liner\n', '629 n03676483 口红, lipstick, lip rouge\n', '630 n03680355 鞋子, Loafer\n', '631 n03690938 护肤品, lotion\n', '632 n03691459 音响, loudspeaker, speaker, speaker unit, loudspeaker system, speaker system\n', '633 n03692522 放大镜, loupe, jeweler’s loupe\n', '634 n03697007 原木, lumbermill, sawmill\n', '635 n03706229 指南针, magnetic compass\n', '636 n03709823 包, mailbag, postbag\n', '637 n03710193 邮箱, mailbox, letter box\n', '638 n03710637 泳衣, maillot\n', '639 n03710721 泳衣, maillot, tank suit\n', '640 n03717622 窨井盖, manhole cover\n', '641 n03720891 手摇铃, maraca\n', '642 n03721384 木琴, marimba, xylophone\n', '643 n03724870 面具, mask\n', '644 n03729826 火柴, matchstick\n', '645 n03733131 绳子, maypole\n', '646 n03733281 迷宫, maze, labyrinth\n', '647 n03733805 烧杯, measuring cup\n', '648 n03742115 冰箱, medicine chest, medicine cabinet\n', '649 n03743016 石柱, megalith, megalithic structure\n', '650 n03759954 话筒, microphone, mike\n', '651 n03761084 微波炉, microwave, microwave oven\n', '652 n03763968 军人, military uniform\n', '653 n03764736 水壶, milk can\n', '654 n03769881 小客车 check, minibus\n', '655 n03770439 短裙, miniskirt, mini\n', '656 n03770679 面包车 check, minivan\n', '657 n03773504 导弹, missile\n', '658 n03775071 手套, mitten\n', '659 n03775546 碗, mixing bowl\n', '660 n03776460 房车, mobile home, manufactured home\n', '661 n03777568 老爷车, Model T\n', '662 n03777754 路由器, modem\n', '663 n03781244 建筑, monastery\n', '664 n03782006 显示器, monitor\n', '665 n03785016 摩托车 check, moped\n', '666 n03786901 砚, mortar\n', '667 n03787032 学士帽, mortarboard\n', '668 n03788195 建筑, mosque\n', '669 n03788365 蚊帐, mosquito net\n', '670 n03791053 助动车 check, motor scooter, scooter\n', '671 n03792782 自行车 check, mountain bike, all-terrain bike, off-roader\n', '672 n03792972 帐篷, mountain tent\n', '673 n03793489 键盘鼠标, mouse, computer mouse\n', '674 n03794056 捕鼠夹, mousetrap\n', '675 n03796401 货车 卡车 check, moving van\n', '676 n03803284 狗嘴套, muzzle\n', '677 n03804744 钉子, nail\n', '678 n03814639 颈托, neck brace\n', '679 n03814906 项链, necklace\n', '680 n03825788 奶瓶, nipple\n', '681 n03832673 笔记本电脑, notebook, notebook computer\n', '682 n03837869 建筑, obelisk\n', '683 n03838899 黑管, oboe, hautboy, hautbois\n', '684 n03840681 埙, ocarina, sweet potato\n', '685 n03841143 仪表盘, odometer, hodometer, mileometer, milometer\n', '686 n03843555 机油滤清器, oil filter\n', '687 n03854065 管风琴, organ, pipe organ\n', '688 n03857828 示波器, oscilloscope, scope, cathode-ray oscilloscope, CRO\n', '689 n03866082 礼服, overskirt\n', '690 n03868242 牛车, oxcart\n', '691 n03868863 呼吸器, oxygen mask\n', '692 n03871628 零食, packet\n', '693 n03873416 划桨, paddle, boat paddle\n', '694 n03874293 水轮, paddlewheel, paddle wheel\n', '695 n03874599 锁, padlock\n', '696 n03876231 刷子, paintbrush\n', '697 n03877472 睡衣, pajama, pyjama, pj’s, jammies\n', '698 n03877845 建筑, palace\n', '699 n03884397 乐器, panpipe, pandean pipe, syrinx\n', '700 n03887697 纸巾, paper towel\n', '701 n03888257 降落伞, parachute, chute\n', '702 n03888605 体操, parallel bars, bars\n', '703 n03891251 长椅, park bench\n', '704 n03891332 停车缴费器, parking meter\n', '705 n03895866 火车 check, passenger car, coach, carriage\n', '706 n03899768 院子, patio, terrace\n', '707 n03902125 公用电话, pay-phone, pay-station\n', '708 n03903868 柱子, pedestal, plinth, footstall\n', '709 n03908618 文具袋, pencil box, pencil case\n', '710 n03908714 卷笔刀, pencil sharpener\n', '711 n03916031 香水, perfume, essence\n', '712 n03920288 培养皿, Petri dish\n', '713 n03924679 打印机, photocopier\n', '714 n03929660 吉他拨片, pick, plectrum, plectron\n', '715 n03929855 头盔, pickelhaube\n', '716 n03930313 栅栏, picket fence, paling\n', '717 n03930630 轿车 check, pickup, pickup truck\n', '718 n03933933 桥, pier\n', '719 n03935335 储蓄罐, piggy bank, penny bank\n', '720 n03937543 药丸, pill bottle\n', '721 n03938244 枕头, pillow\n', '722 n03942813 乒乓球, ping-pong ball\n', '723 n03944341 风车, pinwheel\n', '724 n03947888 帆船, pirate, pirate ship\n', '725 n03950228 茶壶, pitcher, ewer\n', '726 n03954731 刨子, plane, carpenter’s plane, woodworking plane\n', '727 n03956157 建筑, planetarium\n', '728 n03958227 塑料袋, plastic bag\n', '729 n03961711 碗架, plate rack\n', '730 n03967562 推土机, plow, plough\n', '731 n03970156 搋子, plunger, plumber’s helper\n', '732 n03976467 相机, Polaroid camera, Polaroid Land camera\n', '733 n03976657 杆子, pole\n', '734 n03977966 警车 check, police van, police wagon, paddy wagon, patrol wagon, wagon, black Maria\n', '735 n03980874 披风, poncho\n', '736 n03982430 桌球, pool table, billiard table, snooker table\n', '737 n03983396 瓶子, pop bottle, soda bottle\n', '738 n03991062 盆栽, pot, flowerpot\n', '739 n03992509 陶艺, potter’s wheel\n', '740 n03995372 钻机, power drill\n', '741 n03998194 毯子, prayer rug, prayer mat\n', '742 n04004767 打印机, printer\n', '743 n04005630 监狱, prison, prison house\n', '744 n04008634 导弹, projectile, missile\n', '745 n04009552 投影仪, projector\n', '746 n04019541 冰球, puck, hockey puck\n', '747 n04023962 拳击, punching bag, punch bag, punching ball, punchball\n', '748 n04026417 手提袋, purse\n', '749 n04033901 羽毛笔, quill, quill pen\n', '750 n04033995 床 被子, quilt, comforter, comfort, puff\n', '751 n04037443 赛车, racer, race car, racing car\n', '752 n04039381 网球, racket, racquet\n', '753 n04040759 加热器, radiator\n', '754 n04041544 收音机, radio, wireless\n', '755 n04044716 卫星接收器, radio telescope, radio reflector\n', '756 n04049303 酒桶, rain barrel\n', '757 n04065272 房车, recreational vehicle, RV, R.V.\n', '758 n04067472 鱼竿, reel\n', '759 n04069434 相机, reflex camera\n', '760 n04070727 冰箱, refrigerator, icebox\n', '761 n04074963 遥控器, remote control, remote\n', '762 n04081281 餐厅, restaurant, eating house, eating place, eatery\n', '763 n04086273 手枪, revolver, six-gun, six-shooter\n', '764 n04090263 狙击枪, rifle\n', '765 n04099969 摇椅, rocking chair, rocker\n', '766 n04111531 烤箱, rotisserie\n', '767 n04116512 橡皮, rubber eraser, rubber, pencil eraser\n', '768 n04118538 橄榄球, rugby ball\n', '769 n04118776 尺, rule, ruler\n', '770 n04120489 运动鞋, running shoe\n', '771 n04125021 保险箱, safe\n', '772 n04127249 回形针, safety pin\n', '773 n04131690 调料瓶, saltshaker, salt shaker\n', '774 n04133789 拖鞋, sandal\n', '775 n04136333 长裙, sarong\n', '776 n04141076 萨克斯, sax, saxophone\n', '777 n04141327 剑, scabbard\n', '778 n04141975 秤, scale, weighing machine\n', '779 n04146614 校车, school bus\n', '780 n04147183 帆船, schooner\n', '781 n04149813 计分板, scoreboard\n', '782 n04152593 显示器, screen, CRT screen\n', '783 n04153751 螺丝, screw\n', '784 n04154565 螺丝刀, screwdriver\n', '785 n04162706 安全带, seat belt, seatbelt\n', '786 n04179913 缝纫机, sewing machine\n', '787 n04192698 盾牌, shield, buckler\n', '788 n04200800 鞋店, shoe shop, shoe-shop, shoe store\n', '789 n04201297 榻榻米, shoji\n', '790 n04204238 购物篮, shopping basket\n', '791 n04204347 购物车, shopping cart\n', '792 n04208210 铲子, shovel\n', '793 n04209133 浴帽, shower cap\n', '794 n04209239 浴帘, shower curtain\n', '795 n04228054 滑雪, ski\n', '796 n04229816 面罩, ski mask\n', '797 n04235860 睡袋, sleeping bag\n', '798 n04238763 游标卡尺, slide rule, slipstick\n', '799 n04239074 移门, sliding door\n', '800 n04243546 老虎机, slot, one-armed bandit\n', '801 n04251144 游泳眼镜, snorkel\n', '802 n04252077 滑雪车, snowmobile\n', '803 n04252225 铲雪车, snowplow, snowplough\n', '804 n04254120 洗手液, soap dispenser\n', '805 n04254680 足球, soccer ball\n', '806 n04254777 袜子, sock\n', '807 n04258138 太阳能板, solar dish, solar collector, solar furnace\n', '808 n04259630 帽子, sombrero\n', '809 n04263257 碗, soup bowl\n', '810 n04264628 键盘, space bar\n', '811 n04265275 电热器, space heater\n', '812 n04266014 航天飞船, space shuttle\n', '813 n04270147 锅铲, spatula\n', '814 n04273569 快艇, speedboat\n', '815 n04275548 蜘蛛网, spider web, spider’s web\n', '816 n04277352 毛线, spindle\n', '817 n04285008 运动型轿车 check, sports car, sport car\n', '818 n04286575 探照灯, spotlight, spot\n', '819 n04296562 乐队, stage\n', '820 n04310018 蒸汽机车, steam locomotive\n', '821 n04311004 桥, steel arch bridge\n', '822 n04311174 鼓, steel drum\n', '823 n04317175 听诊器, stethoscope\n', '824 n04325704 担架, stole\n', '825 n04326547 石堆, stone wall\n', '826 n04328186 秒表, stopwatch, stop watch\n', '827 n04330267 火炉, stove\n', '828 n04332243 滤网, strainer\n', '829 n04335435 公交车 check, streetcar, tram, tramcar, trolley, trolley car\n', '830 n04336792 担架, stretcher\n', '831 n04344873 沙发, studio couch, day bed\n', '832 n04346328 皇宫, stupa, tope\n', '833 n04347754 轮船, submarine, pigboat, sub, U-boat\n', '834 n04350905 西装, suit, suit of clothes\n', '835 n04355338 日晷, sundial\n', '836 n04355933 墨镜, sunglass\n', '837 n04356056 墨镜, sunglasses, dark glasses, shades\n', '838 n04357314 防晒霜, sunscreen, sunblock, sun blocker\n', '839 n04366367 桥, suspension bridge\n', '840 n04367480 拖把, swab, swob, mop\n', '841 n04370456 连帽衫, sweatshirt\n', '842 n04371430 沙滩裤, swimming trunks, bathing trunks\n', '843 n04371774 秋千, swing\n', '844 n04372370 开关, switch, electric switch, electrical switch\n', '845 n04376876 针筒, syringe\n', '846 n04380533 台灯, table lamp\n', '847 n04389033 坦克, tank, army tank, armored combat vehicle, armoured combat vehicle\n', '848 n04392985 磁带播放器, tape player\n', '849 n04398044 茶壶, teapot\n', '850 n04399382 毛绒玩具, teddy, teddy bear\n', '851 n04404412 电视机, television, television system\n', '852 n04409515 网球, tennis ball\n', '853 n04417672 草屋, thatch, thatched roof\n', '854 n04418357 幕布, theater curtain, theatre curtain\n', '855 n04423845 指套, thimble\n', '856 n04428191 装甲车, thresher, thrasher, threshing machine\n', '857 n04429376 皇位, throne\n', '858 n04435653 瓦片, tile roof\n', '859 n04442312 面包机, toaster\n', '860 n04443257 烟酒店, tobacco shop, tobacconist shop, tobacconist\n', '861 n04447861 马桶, toilet seat\n', '862 n04456115 火炬, torch\n', '863 n04458633 图腾, totem pole\n', '864 n04461696 大卡车 check, tow truck, tow car, wrecker\n', '865 n04462240 玩具店, toyshop\n', '866 n04465501 拖拉机, tractor\n', '867 n04467665 大货车 check, trailer truck, tractor trailer, trucking rig, rig, articulated lorry, semi\n', '868 n04476259 碟子 盘子, tray\n', '869 n04479046 风衣, trench coat\n', '870 n04482393 儿童自行车, tricycle, trike, velocipede\n', '871 n04483307 船, trimaran\n', '872 n04485082 三脚架, tripod\n', '873 n04486054 拱门, triumphal arch\n', '874 n04487081 巴士 check, trolleybus, trolley coach, trackless trolley\n', '875 n04487394 长号, trombone\n', '876 n04493381 浴缸, tub, vat\n', '877 n04501370 闸机, turnstile\n', '878 n04505470 打字机, typewriter keyboard\n', '879 n04507155 伞, umbrella\n', '880 n04509417 独轮车, unicycle, monocycle\n', '881 n04515003 钢琴, upright, upright piano\n', '882 n04517823 吸尘器, vacuum, vacuum cleaner\n', '883 n04522168 花瓶, vase\n', '884 n04523525 拱廊, vault\n', '885 n04525038 珊瑚绒, velvet\n', '886 n04525305 自动贩卖机, vending machine\n', '887 n04532106 教皇袍, vestment\n', '888 n04532670 桥, viaduct\n', '889 n04536866 小提琴, violin, fiddle\n', '890 n04540053 排球, volleyball\n', '891 n04542943 煎饼锅, waffle iron\n', '892 n04548280 挂钟, wall clock\n', '893 n04548362 钱夹, wallet, billfold, notecase, pocketbook\n', '894 n04550184 柜子, wardrobe, closet, press\n', '895 n04552348 飞机, warplane, military plane\n', '896 n04553703 台盆, washbasin, handbasin, washbowl, lavabo, wash-hand basin\n', '897 n04554684 洗衣机, washer, automatic washer, washing machine\n', '898 n04557648 水瓶, water bottle\n', '899 n04560804 水壶, water jug\n', '900 n04562935 煤气包, water tower\n', '901 n04579145 水壶, whiskey jug\n', '902 n04579432 哨子, whistle\n', '903 n04584207 头发, wig\n', '904 n04589890 窗户, window screen\n', '905 n04590129 百叶窗, window shade\n', '906 n04591157 领带, Windsor tie\n', '907 n04591713 葡萄酒, wine bottle\n', '908 n04592741 飞机, wing\n', '909 n04596742 炒锅, wok\n', '910 n04597913 勺子, wooden spoon\n', '911 n04599235 围巾, wool, woolen, woollen\n', '912 n04604644 栅栏, worm fence, snake fence, snake-rail fence, Virginia fence\n', '913 n04606251 沉船, wreck\n', '914 n04612504 帆船, yawl\n', '915 n04613696 蒙古包, yurt\n', '916 n06359193 网页, web site, website, internet site, site\n', '917 n06596364 海报, comic book\n', '918 n06785654 填字游戏, crossword puzzle, crossword\n', '919 n06794110 交通标志, street sign\n', '920 n06874185 交通灯, traffic light, traffic signal, stoplight\n', '921 n07248320 书, book jacket, dust cover, dust jacket, dust wrapper\n', '922 n07565083 菜单, menu\n', '923 n07579787 菜, plate\n', '924 n07583066 菜, guacamole\n', '925 n07584110 菜, consomme\n', '926 n07590611 菜, hot pot, hotpot\n', '927 n07613480 蛋糕, trifle\n', '928 n07614500 冰激凌, ice cream, icecream\n', '929 n07615774 棒冰, ice lolly, lolly, lollipop, popsicle\n', '930 n07684084 面包, French loaf\n', '931 n07693725 甜甜圈, bagel, beigel\n', '932 n07695742 面包, pretzel\n', '933 n07697313 汉堡, cheeseburger\n', '934 n07697537 热狗, hotdog, hot dog, red hot\n', '935 n07711569 焗饭, mashed potato\n', '936 n07714571 蔬菜, head cabbage\n', '937 n07714990 西蓝花, broccoli\n', '938 n07715103 花椰菜, cauliflower\n', '939 n07716358 蔬菜, zucchini, courgette\n', '940 n07716906 金瓜, spaghetti squash\n', '941 n07717410 南瓜, acorn squash\n', '942 n07717556 南瓜, butternut squash\n', '943 n07718472 黄瓜, cucumber, cuke\n', '944 n07718747 蔬菜, artichoke, globe artichoke\n', '945 n07720875 青椒 黄椒 红椒, bell pepper\n', '946 n07730033 花, cardoon\n', '947 n07734744 蘑菇, mushroom\n', '948 n07742313 苹果, Granny Smith\n', '949 n07745940 草莓, strawberry\n', '950 n07747607 橙子, orange\n', '951 n07749582 柠檬, lemon\n', '952 n07753113 水果, fig\n', '953 n07753275 菠萝, pineapple, ananas\n', '954 n07753592 香蕉, banana\n', '955 n07754684 榴莲, jackfruit, jak, jack\n', '956 n07760859 水果, custard apple\n', '957 n07768694 石榴, pomegranate\n', '958 n07802026 草垛, hay\n', '959 n07831146 意大利面, carbonara\n', '960 n07836838 甜品, chocolate sauce, chocolate syrup\n', '961 n07860988 面团, dough\n', '962 n07871810 肉酱, meat loaf, meatloaf\n', '963 n07873807 披萨, pizza, pizza pie\n', '964 n07875152 派, potpie\n', '965 n07880968 肉卷, burrito\n', '966 n07892512 红酒, red wine\n', '967 n07920052 咖啡, espresso\n', '968 n07930864 茶, cup\n', '969 n07932039 饮料杯, eggnog\n', '970 n09193705 雪山, alp\n', '971 n09229709 泡泡, bubble\n', '972 n09246464 悬崖, cliff, drop, drop-off\n', '973 n09256479 珊瑚, coral reef\n', '974 n09288635 温泉, geyser\n', '975 n09332890 风景, lakeside, lakeshore\n', '976 n09399592 小岛, promontory, headland, head, foreland\n', '977 n09421951 沙滩, sandbar, sand bar\n', '978 n09428293 海滩, seashore, coast, seacoast, sea-coast\n', '979 n09468604 瀑布 溪流, valley, vale\n', '980 n09472597 火山, volcano\n', '981 n09835506 棒球, ballplayer, baseball player\n', '982 n10148035 婚礼, groom, bridegroom\n', '983 n10565667 潜水, scuba diver\n', '984 n11879895 油菜花, rapeseed\n', '985 n11939491 菊花, daisy\n', '986 n12057211 植物, yellow lady’s slipper, yellow lady-slipper, Cypripedium calceolus, Cypripedium parviflorum\n', '987 n12144580 玉米, corn\n', '988 n12267677 松果, acorn\n', '989 n12620546 植物, hip, rose hip, rosehip\n', '990 n12768682 栗子, buckeye, horse chestnut, conker\n', '991 n12985857 菌菇, coral fungus\n', '992 n12998815 菌菇, agaric\n', '993 n13037406 菌菇, gyromitra\n', '994 n13040303 菌菇, stinkhorn, carrion fungus\n', '995 n13044778 菌菇, earthstar\n', '996 n13052670 菌菇, hen-of-the-woods, hen of the woods, Polyporus frondosus, Grifola frondosa\n', '997 n13054560 菌菇, bolete\n', '998 n13133613 玉米, ear, spike, capitulum\n', '999 n15075141 卷筒纸, toilet tissue, toilet paper, bathroom tissue']

加载模型和数据

# load model
path_state_dict = os.path.join(BASE_DIR, "data", "vgg16-397923af.pth")
vgg_model = get_vgg16(path_state_dict, device, True)
print(path_state_dict)
print(vgg_model)

运行结果:

----------------------------------------------------------------
        Layer (type)               Output Shape         Param #
================================================================
            Conv2d-1         [-1, 64, 224, 224]           1,792
              ReLU-2         [-1, 64, 224, 224]               0
            Conv2d-3         [-1, 64, 224, 224]          36,928
              ReLU-4         [-1, 64, 224, 224]               0
         MaxPool2d-5         [-1, 64, 112, 112]               0
            Conv2d-6        [-1, 128, 112, 112]          73,856
              ReLU-7        [-1, 128, 112, 112]               0
            Conv2d-8        [-1, 128, 112, 112]         147,584
              ReLU-9        [-1, 128, 112, 112]               0
        MaxPool2d-10          [-1, 128, 56, 56]               0
           Conv2d-11          [-1, 256, 56, 56]         295,168
             ReLU-12          [-1, 256, 56, 56]               0
           Conv2d-13          [-1, 256, 56, 56]         590,080
             ReLU-14          [-1, 256, 56, 56]               0
           Conv2d-15          [-1, 256, 56, 56]         590,080
             ReLU-16          [-1, 256, 56, 56]               0
        MaxPool2d-17          [-1, 256, 28, 28]               0
           Conv2d-18          [-1, 512, 28, 28]       1,180,160
             ReLU-19          [-1, 512, 28, 28]               0
           Conv2d-20          [-1, 512, 28, 28]       2,359,808
             ReLU-21          [-1, 512, 28, 28]               0
           Conv2d-22          [-1, 512, 28, 28]       2,359,808
...
    (5): Dropout(p=0.5, inplace=False)
    (6): Linear(in_features=4096, out_features=1000, bias=True)
  )
)
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

模型推理

将图像数据输入模型进行推理,得到输出结果。
对输出结果进行处理,包括获取预测类别和置信度最高的前5个类别。
打印预测结果和推理时间。

# %%timeit # 注意变量会被释放掉
# inference  tensor --> vector
with torch.no_grad():
    time_tic = time.time()
    outputs = vgg_model(img_tensor)
    time_toc = time.time()
    print("time consuming:{:.2f}s".format(time_toc - time_tic))
    print(outputs.shape)

运行结果:

time consuming:3.80s
torch.Size([1, 1000])
# 4/5 index to class names
_, pred_int = torch.max(outputs.data, 1)
_, top5_idx = torch.topk(outputs.data, 5, dim=1)

pred_idx = int(pred_int.cpu().numpy())
pred_str, pred_cn = cls_n[pred_idx], cls_n_cn[pred_idx]
print("img: {} is: {}\n\n{}".format(os.path.basename(path_img), pred_str, pred_cn))
img: Golden Retriever.jpg is: golden retriever

207 n02099601 狗, golden retriever

可视化结果

显示原始图像。
在图像上绘制预测的类别和前5个置信度最高的类别。

# 5/5 visualization
from matplotlib import pyplot as plt

plt.imshow(img_rgb)
plt.title("predict:{}".format(pred_str))
top5_num = top5_idx.cpu().numpy().squeeze()
text_str = [cls_n[t] for t in top5_num]
for idx in range(len(top5_num)):
    plt.text(5, 15+idx*40, "top {}:{}".format(idx+1, text_str[idx]), bbox=dict(fc='yellow'))
plt.show()

在这里插入图片描述

  • 28
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
Unity 穿山甲是指在 Unity 引擎中接入穿山甲广告SDK的过程。穿山甲广告SDK是一种用于在应用程序中展示广告的工具。根据引用,您可以在给定的博客文章中找到 Unity 接入穿山甲广告SDK的示例源代码。同时,引用提供了穿山甲官方网站上的SDK下载链接。 然而,您提到在导入穿山甲SDK后,在打包APK时遇到了一个错误。根据引用,这个错误可能是因为您的mainTemplate.gradle文件使用了旧版的aaptOptions noCompress属性定义,而未包括unityStreamingAssets常量定义的类型。为了解决这个错误,您可以尝试更新mainTemplate.gradle文件中的aaptOptions noCompress属性定义,以包括unityStreamingAssets常量定义的类型。这样可以确保在打包APK时正确处理Unity Streaming Assets。 总结起来,Unity 穿山甲是指在 Unity 引擎中接入穿山甲广告SDK的过程。您可以通过引用中的示例源代码和引用中的官方SDK下载链接来完成接入。同时,如果在导入SDK后遇到错误,您可以参考引用中提供的解决方案来处理该错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [unity接入穿山甲广告SDK示例Demo源码 V4.1.0.2](https://download.csdn.net/download/gaoliang0/71924016)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Unity接入穿山甲广告SDK(以及GroMoreDemo)](https://blog.csdn.net/gaoliang0/article/details/121544454)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [unity穿山甲SDK打包问题](https://blog.csdn.net/qinooo/article/details/120504478)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值