先解压
tar -xvf ILSVRC2012_img_train.tar
解压之后其实还是1000个tar压缩包(对应1000个类别),需要再次解压,解压脚本unzip.sh如下(PS:可能需要自己改一下目录 dir ):
(这里也可以用解压软件一键解压)
批量解压脚本
dir=./train
for x in `ls $dir/*tar` do
filename=`basename $x .tar`
mkdir $dir/$filename
tar -xvf $x -C $dir/$filename
done
rm *.tar
执行 sh 脚本
chmod 777 unzip.sh
./ unzip.sh
报错:./unzip.sh: line 3: syntax error near unexpected token filename=
basename $x .tar`’
直接使用指令ls *.tar | xargs -n1 tar xvf
将当前文件夹下的tar解压linux批量解压方法
或者:
python批量解压zip文件
import os
import shutil
import zipfile
# 首先引入需要的工具包
# shutil为后期移动文件所需,可以忽略此项
# 路径改这里!
#parent_path = r'输入路径,会解压该路径下的所有zip压缩文件'
parent_path = r'E:\py\python3.7\test\test99\zip'
# 文件类型选择
# 可以自行更改压缩文件类型,需要引入其它工具包,如tarfile等
# 这里是因为在自己的windows上,zip比较常见,其他类型请自行更改
file_flag = '.zip' #修改需解压的格式 例如:.rar
# 删除已解压的zip文件
# 不建议初次使用,在确定程序无误后可以添加使用
def del_old_zip(file_path):
os.remove(file_path)
# 解压
def decompress(file_path, root):
# 开始
# zipfile打开zip文件
z = zipfile.ZipFile(f'{file_path}', 'r')
# 解压
z.extractall(path=f"{root}") # path为解压路径,解包后位于该路径下
# 判断是否需要重复解包
for names in z.namelist():
if names.endswith(file_flag):
z.close()
return 1
# 结束
z.close()
return 0
# 因为我在使用过程中发现有些zip解包后会混在一起
# 在平时大家手动解压时可能也会遇到提示是否覆盖的问题
# 下面的两个函数解决这一问题
# 开始要先创建一个大文件夹 与压缩包名字相同
# 避免后期混乱和麻烦
def start_dir_make(root, dirname):
os.chdir(root)
os.mkdir(dirname)
return os.path.join(root, dirname)
# 去除多余文件夹
def rem_dir_extra(root, father_dir_name):
# 递归要注意信息的正常处理 搞不好上一个调用已经改变了东西 而下面的调用还是使用之前的数据
try:
# 判断文件夹重名 开始
for item in os.listdir(os.path.join(root, father_dir_name)):
# 第一步判断是不是一个文件夹,如果不是则跳过本次循环
if not os.path.isdir(os.path.join(root, father_dir_name, item)):
continue
# 判断是否要脱掉一层目录结构
# 文件夹名字要相同,且子目录中只有单独的一个文件夹
if item == father_dir_name and len(
os.listdir(os.path.join(root, father_dir_name))) == 1:
# 改变工作目录
os.chdir(root)
# 将无用文件夹重命名,因为直接移动会有重名错误
os.rename(father_dir_name, father_dir_name + '-old')
# 移动文件后删除空文件夹
shutil.move(os.path.join(root, father_dir_name + '-old', item), os.path.join(root))
os.rmdir(os.path.join(root, father_dir_name + '-old'))
# 将去掉一层目录结构后的文件夹继续作为父本递归处理下去
# 这里要注意,上面已经发生过数据的改动,所以下面递归传参一定要正确!
rem_dir_extra(root, item)
else:
# 处理那些不满足上面条件的文件夹
rem_dir_extra(os.path.join(root, father_dir_name), item)
except Exception as e:
# 打印错误信息
print("清除文件夹出错" + str(e))
# 入口
if __name__ == '__main__':
flag = 1
while flag:
# 循环遍历文件夹
for root, dirs, files in os.walk(parent_path):
# 读取文件名
for name in files:
if name.endswith(file_flag):
# 创建文件夹
new_ws = start_dir_make(root, name.replace(file_flag, ''))
# zip文件地址
zip_path = os.path.join(root, name)
# 解压
flag = decompress(zip_path, new_ws)
# 删除解压后的文件
# 有点危险
# 但不删除又可能会重复运行
# 一定要备份或先测试,不然可能会凉,自己选择修改
del_old_zip(zip_path)
# 去掉多余的文件结构
rem_dir_extra(root, name.replace(file_flag, ''))
print(f'{root}\\{name}'.join(['文件:', '\n解压完成\n']))
# 由于解压可能解了好几次 所以可能会有已经解压好的父级目录重名无法处理 这里要再处理一次
rem_dir_extra(os.path.split(parent_path)[0], os.path.split(parent_path)[1])
print("解压完成啦,记得检查有没有zip格式之外的呀!\n\n其他格式需要自己改一下了")
查看文件夹下文件数量
ls -l|grep "^-" |wc -l
统计文件名中包含某个名称(n15075141_)的文件的文件总数
find -name "n15075141_*" | wc -l
这里我使用这官方提供的脚本文件
#!/bin/bash
#
# script to extract ImageNet dataset
# ILSVRC2012_img_train.tar (about 138 GB)
# ILSVRC2012_img_val.tar (about 6.3 GB)
# make sure ILSVRC2012_img_train.tar & ILSVRC2012_img_val.tar in your current directory
#
# Adapted from:
# https://github.com/facebook/fb.resnet.torch/blob/master/INSTALL.md
# https://gist.github.com/BIGBALLON/8a71d225eff18d88e469e6ea9b39cef4
#
# imagenet/train/
# ├── n01440764
# │ ├── n01440764_10026.JPEG
# │ ├── n01440764_10027.JPEG
# │ ├── ......
# ├── ......
# imagenet/val/
# ├── n01440764
# │ ├── ILSVRC2012_val_00000293.JPEG
# │ ├── ILSVRC2012_val_00002138.JPEG
# │ ├── ......
# ├── ......
#
#
# Make imagnet directory
#
mkdir imagenet
#
# Extract the training data:
#
# Create train directory; move .tar file; change directory
mkdir imagenet/train && mv ILSVRC2012_img_train.tar imagenet/train/ && cd imagenet/train
# Extract training set; remove compressed file
tar -xvf ILSVRC2012_img_train.tar && rm -f ILSVRC2012_img_train.tar
#
# At this stage imagenet/train will contain 1000 compressed .tar files, one for each category
#
# For each .tar file:
# 1. create directory with same name as .tar file
# 2. extract and copy contents of .tar file into directory
# 3. remove .tar file
find . -name "*.tar" | while read NAME ; do mkdir -p "${NAME%.tar}"; tar -xvf "${NAME}" -C "${NAME%.tar}"; rm -f "${NAME}"; done
#
# This results in a training directory like so:
#
# imagenet/train/
# ├── n01440764
# │ ├── n01440764_10026.JPEG
# │ ├── n01440764_10027.JPEG
# │ ├── ......
# ├── ......
#
# Change back to original directory
cd ../..
#
# Extract the validation data and move images to subfolders:
#
# Create validation directory; move .tar file; change directory; extract validation .tar; remove compressed file
mkdir imagenet/val && mv ILSVRC2012_img_val.tar imagenet/val/ && cd imagenet/val && tar -xvf ILSVRC2012_img_val.tar && rm -f ILSVRC2012_img_val.tar
# get script from soumith and run; this script creates all class directories and moves images into corresponding directories
wget -qO- https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh | bash
#
# This results in a validation directory like so:
#
# imagenet/val/
# ├── n01440764
# │ ├── ILSVRC2012_val_00000293.JPEG
# │ ├── ILSVRC2012_val_00002138.JPEG
# │ ├── ......
# ├── ......
#
#
# Check total files after extract
#
# $ find train/ -name "*.JPEG" | wc -l
# 1281167
# $ find val/ -name "*.JPEG" | wc -l
# 50000
#
参考文章
具体类别如下1000类信息
因为标签很少,图像较多,只有部分图像有标签对应,所以需要删除多余的图像。
数据集目录结构如下
先查看一下类别信息
在ILSVRC2012_devkit_t12中的meta.mat文件中存放着类型信息(1000)类
matlab配置
Ubuntu下通过命令打开图片
xdg-open n02098286_4811.JPEG
在一个文件夹下就是一类的
将标签全部复制到ann下
python遍历文件夹下的所有子文件夹,并将指定的文件复制到指定目录
# coding: utf-8
from PIL import Image, ImageDraw, ImageFont
import os
import shutil
import cv2 as cv
import numpy as np
import json
#批量复制
# 为了防止重名覆盖问题,先使用改名软件将文件名全部改了
def batchCopy(src,des,suffix):
print("封装代码")
for root, dirs, files in os.walk(src):
print(root)
all_files = os.listdir(root)
filtered_files = [file for file in all_files if file.endswith(suffix)]
# 遍历原文件夹中的文件
if (len(filtered_files)):
for i in range(len(files)):
full_file_name = root+"/"+files[i]
print("要被复制的全文件路径全名:", full_file_name)
shutil.copy(full_file_name, des) # shutil.copy函数放入原文件的路径文件全名 然后放入目标文件夹
if __name__ == "__main__":
src = "/home/ubuntu/data/ilsvrc2012/ILSVRC2012_img_train_new/imagenet/val" # 原文件夹路径
des = "/home/ubuntu/data/ilsvrc2012/imageval" # 目标文件夹路径
suffix = ".JPEG"
batchCopy(src,des,suffix)
删除两文件夹多出的文件,两文件夹文件后缀名不同,单个文件夹有多个后缀名文件
参考代码
就是图片比标签多,将多余的图片删除,使得图片和标签数量一一对应
# encoding:utf-8
import os
import os.path
# 删除pic_dir中比txt_dir多出的文件
pic_dir = 'D:\\dataset\\total' # 你的图片文件夹路径
txt_dir = 'D:\\dataset\\ann' # 你的标签文件夹路径
def txt(rootdir):
a = []
for parent, dirnames, filenames in os.walk(rootdir):
for filenames in filenames:
filenames = filenames.split('.')[0] # 获取无后缀名的文件名称
a.append(filenames)
return a
def pic(rootdir):
b = []
for parent, dirnames, filenames in os.walk(rootdir):
for filenames in filenames:
filenames = filenames.split('.')[0] # 获取无后缀名的文件名称
b.append(filenames)
return b
if __name__ == '__main__':
txt_set = txt(txt_dir)
txt_set = set(txt_set) # 删除txt_set中的重复
pic_set = pic(pic_dir)
pic_set = set(pic_set) # 删除pic_set中的重复
# comp=txt_set-pic_set
comp = pic_set - txt_set # 图片比标注多时,进行做差
print("ok")
print(len(comp))
for item in comp:
# 删去这些无标注的图片
for root, dirs, files in os.walk(pic_dir):
for file in files:
filename = file.split('.')[0] # 获取无后缀名的文件名称
if item == filename:
os.remove(pic_dir + '/' + file)
# file = pic_dir + '/' + item + '.png' #删除pic_dir中多出的文件
# if os.path.exists(file):
# os.remove(file)
# print(file)
Imagenet提供了标签是xml的,就和voc是一样的
首先获取类别信息文件(voc_classes.txt)
0 n01440764 tench 鱼
1 n01443537 goldfish 鱼
2 n01484850 great_white_shark 鱼
3 n01491361 tiger_shark 鱼
4 n01494475 hammerhead 鱼
5 n01496331 electric_ray 鱼
6 n01498041 stingray 鱼
7 n01514668 cock 鸡
8 n01514859 hen 鸡
9 n01518878 ostrich 鸵鸟
10 n01530575 brambling 鸟
11 n01531178 goldfinch 鸟
12 n01532829 house_finch 鸟
13 n01534433 junco 鸟
14 n01537544 indigo_bunting 鸟
15 n01558993 robin 鸟
16 n01560419 bulbul 鸟
17 n01580077 jay 鸟
18 n01582220 magpie 鸟
19 n01592084 chickadee 鸟
20 n01601694 water_ouzel 鸟
21 n01608432 kite 鸟
22 n01614925 bald_eagle 鹰
23 n01616318 vulture 鹰
24 n01622779 great_grey_owl 猫头鹰
25 n01629819 European_fire_salamander 壁虎
26 n01630670 common_newt 壁虎
27 n01631663 eft 壁虎
28 n01632458 spotted_salamander 壁虎
29 n01632777 axolotl 壁虎
30 n01641577 bullfrog 蛤蟆
31 n01644373 tree_frog 青蛙
32 n01644900 tailed_frog 青蛙
33 n01664065 loggerhead 龟
34 n01665541 leatherback_turtle 龟
35 n01667114 mud_turtle 龟
36 n01667778 terrapin 龟
37 n01669191 box_turtle 龟
38 n01675722 banded_gecko 蜥蜴
39 n01677366 common_iguana 蜥蜴
40 n01682714 American_chameleon 蜥蜴
41 n01685808 whiptail 蜥蜴
42 n01687978 agama 蜥蜴
43 n01688243 frilled_lizard 蜥蜴
44 n01689811 alligator_lizard 蜥蜴
45 n01692333 Gila_monster 蜥蜴
46 n01693334 green_lizard 蜥蜴
47 n01694178 African_chameleon 蜥蜴
48 n01695060 Komodo_dragon 蜥蜴
49 n01697457 African_crocodile 鳄鱼
50 n01698640 American_alligator 鳄鱼
51 n01704323 triceratops 恐龙
52 n01728572 thunder_snake 蛇
53 n01728920 ringneck_snake 蛇
54 n01729322 hognose_snake 蛇
55 n01729977 green_snake 蛇
56 n01734418 king_snake 蛇
57 n01735189 garter_snake 蛇
58 n01737021 water_snake 蛇
59 n01739381 vine_snake 蛇
60 n01740131 night_snake 蛇
61 n01742172 boa_constrictor 蛇
62 n01744401 rock_python 蛇
63 n01748264 Indian_cobra 蛇
64 n01749939 green_mamba 蛇
65 n01751748 sea_snake 蛇
66 n01753488 horned_viper 蛇
67 n01755581 diamondback 蛇
68 n01756291 sidewinder 蛇
69 n01768244 trilobite 化石
70 n01770081 harvestman 蜘蛛
71 n01770393 scorpion 蝎子
72 n01773157 black_and_gold_garden_spider 蜘蛛
73 n01773549 barn_spider 蜘蛛
74 n01773797 garden_spider 蜘蛛
75 n01774384 black_widow 蜘蛛
76 n01774750 tarantula 蜘蛛
77 n01775062 wolf_spider 蜘蛛
78 n01776313 tick 蜘蛛
79 n01784675 centipede 蜈蚣
80 n01795545 black_grouse 鸟
81 n01796340 ptarmigan 鸟
82 n01797886 ruffed_grouse 鸟
83 n01798484 prairie_chicken 鸟
84 n01806143 peacock 孔雀
85 n01806567 quail 鸟
86 n01807496 partridge 鸟
87 n01817953 African_grey 鸟
88 n01818515 macaw 鸟
89 n01819313 sulphur-crested_cockatoo 鸟
90 n01820546 lorikeet 鸟
91 n01824575 coucal 鸟
92 n01828970 bee_eater 鸟
93 n01829413 hornbill 鸟
94 n01833805 hummingbird 鸟
95 n01843065 jacamar 鸟
96 n01843383 toucan 鸟
97 n01847000 drake 鸭子
98 n01855032 red-breasted_merganser 鹅
99 n01855672 goose 鹅
100 n01860187 black_swan 鹅
101 n01871265 tusker 大象
102 n01872401 echidna 刺猬
103 n01873310 platypus 鸭嘴兽
104 n01877812 wallaby 袋鼠
105 n01882714 koala 考拉
106 n01883070 wombat 土拨鼠
107 n01910747 jellyfish 水母
108 n01914609 sea_anemone 珊瑚
109 n01917289 brain_coral 珊瑚
110 n01924916 flatworm 海洋生物
111 n01930112 nematode 海蛇
112 n01943899 conch 海螺
113 n01944390 snail 蜗牛
114 n01945685 slug 蜗牛
115 n01950731 sea_slug 海洋生物
116 n01955084 chiton 海洋生物
117 n01968897 chambered_nautilus 海螺
118 n01978287 Dungeness_crab 螃蟹
119 n01978455 rock_crab 螃蟹
120 n01980166 fiddler_crab 螃蟹
121 n01981276 king_crab 螃蟹
122 n01983481 American_lobster 龙虾
123 n01984695 spiny_lobster 龙虾
124 n01985128 crayfish 龙虾
125 n01986214 hermit_crab 寄居蟹
126 n01990800 isopod 海洋生物
127 n02002556 white_stork 鸟
128 n02002724 black_stork 鸟
129 n02006656 spoonbill 鸟
130 n02007558 flamingo 鸟
131 n02009229 little_blue_heron 鸟
132 n02009912 American_egret 鸟
133 n02011460 bittern 鸟
134 n02012849 crane 鸟
135 n02013706 limpkin 鸟
136 n02017213 European_gallinule 鸟
137 n02018207 American_coot 鸟
138 n02018795 bustard 鸟
139 n02025239 ruddy_turnstone 鸟
140 n02027492 red-backed_sandpiper 鸟
141 n02028035 redshank 鸟
142 n02033041 dowitcher 鸟
143 n02037110 oystercatcher 鸟
144 n02051845 pelican 鸟
145 n02056570 king_penguin 企鹅
146 n02058221 albatross 鸟
147 n02066245 grey_whale 鲸鱼
148 n02071294 killer_whale 鲸鱼
149 n02074367 dugong 海象
150 n02077923 sea_lion 海狮
151 n02085620 Chihuahua 狗
152 n02085782 Japanese_spaniel 狗
153 n02085936 Maltese_dog 狗
154 n02086079 Pekinese 狗
155 n02086240 Shih-Tzu 狗
156 n02086646 Blenheim_spaniel 狗
157 n02086910 papillon 狗
158 n02087046 toy_terrier 狗
159 n02087394 Rhodesian_ridgeback 狗
160 n02088094 Afghan_hound 狗
161 n02088238 basset 狗
162 n02088364 beagle 狗
163 n02088466 bloodhound 狗
164 n02088632 bluetick 狗
165 n02089078 black-and-tan_coonhound 狗
166 n02089867 Walker_hound 狗
167 n02089973 English_foxhound 狗
168 n02090379 redbone 狗
169 n02090622 borzoi 狗
170 n02090721 Irish_wolfhound 狗
171 n02091032 Italian_greyhound 狗
172 n02091134 whippet 狗
173 n02091244 Ibizan_hound 狗
174 n02091467 Norwegian_elkhound 狗
175 n02091635 otterhound 狗
176 n02091831 Saluki 狗
177 n02092002 Scottish_deerhound 狗
178 n02092339 Weimaraner 狗
179 n02093256 Staffordshire_bullterrier 狗
180 n02093428 American_Staffordshire_terrier 狗
181 n02093647 Bedlington_terrier 狗
182 n02093754 Border_terrier 狗
183 n02093859 Kerry_blue_terrier 狗
184 n02093991 Irish_terrier 狗
185 n02094114 Norfolk_terrier 狗
186 n02094258 Norwich_terrier 狗
187 n02094433 Yorkshire_terrier 狗
188 n02095314 wire-haired_fox_terrier 狗
189 n02095570 Lakeland_terrier 狗
190 n02095889 Sealyham_terrier 狗
191 n02096051 Airedale 狗
192 n02096177 cairn 狗
193 n02096294 Australian_terrier 狗
194 n02096437 Dandie_Dinmont 狗
195 n02096585 Boston_bull 狗
196 n02097047 miniature_schnauzer 狗
197 n02097130 giant_schnauzer 狗
198 n02097209 standard_schnauzer 狗
199 n02097298 Scotch_terrier 狗
200 n02097474 Tibetan_terrier 狗
201 n02097658 silky_terrier 狗
202 n02098105 soft-coated_wheaten_terrier 狗
203 n02098286 West_Highland_white_terrier 狗
204 n02098413 Lhasa 狗
205 n02099267 flat-coated_retriever 狗
206 n02099429 curly-coated_retriever 狗
207 n02099601 golden_retriever 狗
208 n02099712 Labrador_retriever 狗
209 n02099849 Chesapeake_Bay_retriever 狗
210 n02100236 German_short-haired_pointer 狗
211 n02100583 vizsla 狗
212 n02100735 English_setter 狗
213 n02100877 Irish_setter 狗
214 n02101006 Gordon_setter 狗
215 n02101388 Brittany_spaniel 狗
216 n02101556 clumber 狗
217 n02102040 English_springer 狗
218 n02102177 Welsh_springer_spaniel 狗
219 n02102318 cocker_spaniel 狗
220 n02102480 Sussex_spaniel 狗
221 n02102973 Irish_water_spaniel 狗
222 n02104029 kuvasz 狗
223 n02104365 schipperke 狗
224 n02105056 groenendael 狗
225 n02105162 malinois 狗
226 n02105251 briard 狗
227 n02105412 kelpie 狗
228 n02105505 komondor 狗
229 n02105641 Old_English_sheepdog 狗
230 n02105855 Shetland_sheepdog 狗
231 n02106030 collie 狗
232 n02106166 Border_collie 狗
233 n02106382 Bouvier_des_Flandres 狗
234 n02106550 Rottweiler 狗
235 n02106662 German_shepherd 狗
236 n02107142 Doberman 狗
237 n02107312 miniature_pinscher 狗
238 n02107574 Greater_Swiss_Mountain_dog 狗
239 n02107683 Bernese_mountain_dog 狗
240 n02107908 Appenzeller 狗
241 n02108000 EntleBucher 狗
242 n02108089 boxer 狗
243 n02108422 bull_mastiff 狗
244 n02108551 Tibetan_mastiff 狗
245 n02108915 French_bulldog 狗
246 n02109047 Great_Dane 狗
247 n02109525 Saint_Bernard 狗
248 n02109961 Eskimo_dog 狗
249 n02110063 malamute 狗
250 n02110185 Siberian_husky 狗
251 n02110341 dalmatian 狗
252 n02110627 affenpinscher 狗
253 n02110806 basenji 狗
254 n02110958 pug 狗
255 n02111129 Leonberg 狗
256 n02111277 Newfoundland 狗
257 n02111500 Great_Pyrenees 狗
258 n02111889 Samoyed 狗
259 n02112018 Pomeranian 狗
260 n02112137 chow 狗
261 n02112350 keeshond 狗
262 n02112706 Brabancon_griffon 狗
263 n02113023 Pembroke 狗
264 n02113186 Cardigan 狗
265 n02113624 toy_poodle 狗
266 n02113712 miniature_poodle 狗
267 n02113799 standard_poodle 狗
268 n02113978 Mexican_hairless 狗
269 n02114367 timber_wolf 狼
270 n02114548 white_wolf 狼
271 n02114712 red_wolf 狼
272 n02114855 coyote 狼
273 n02115641 dingo 狼
274 n02115913 dhole 狼
275 n02116738 African_hunting_dog 狼
276 n02117135 hyena 狼
277 n02119022 red_fox 狐狸
278 n02119789 kit_fox 狐狸
279 n02120079 Arctic_fox 狐狸
280 n02120505 grey_fox 狐狸
281 n02123045 tabby 猫
282 n02123159 tiger_cat 猫
283 n02123394 Persian_cat 猫
284 n02123597 Siamese_cat 猫
285 n02124075 Egyptian_cat 猫
286 n02125311 cougar 猫
287 n02127052 lynx 猫
288 n02128385 leopard 豹
289 n02128757 snow_leopard 豹
290 n02128925 jaguar 豹
291 n02129165 lion 狮子
292 n02129604 tiger 老虎
293 n02130308 cheetah 豹
294 n02132136 brown_bear 熊
295 n02133161 American_black_bear 熊
296 n02134084 ice_bear 熊
297 n02134418 sloth_bear 熊
298 n02137549 mongoose 猫鼬
299 n02138441 meerkat 猫鼬
300 n02165105 tiger_beetle 昆虫
301 n02165456 ladybug 昆虫
302 n02167151 ground_beetle 昆虫
303 n02168699 long-horned_beetle 昆虫
304 n02169497 leaf_beetle 昆虫
305 n02172182 dung_beetle 昆虫
306 n02174001 rhinoceros_beetle 昆虫
307 n02177972 weevil 昆虫
308 n02190166 fly 昆虫
309 n02206856 bee 昆虫
310 n02219486 ant 昆虫
311 n02226429 grasshopper 昆虫
312 n02229544 cricket 昆虫
313 n02231487 walking_stick 昆虫
314 n02233338 cockroach 昆虫
315 n02236044 mantis 昆虫
316 n02256656 cicada 昆虫
317 n02259212 leafhopper 昆虫
318 n02264363 lacewing 昆虫
319 n02268443 dragonfly 蜻蜓
320 n02268853 damselfly 蜻蜓
321 n02276258 admiral 蝴蝶
322 n02277742 ringlet 蝴蝶
323 n02279972 monarch 蝴蝶
324 n02280649 cabbage_butterfly 蝴蝶
325 n02281406 sulphur_butterfly 蝴蝶
326 n02281787 lycaenid 蝴蝶
327 n02317335 starfish 海星
328 n02319095 sea_urchin 海胆
329 n02321529 sea_cucumber 海洋生物
330 n02325366 wood_rabbit 兔子
331 n02326432 hare 兔子
332 n02328150 Angora 兔子
333 n02342885 hamster 鼠
334 n02346627 porcupine 鼠
335 n02356798 fox_squirrel 松鼠
336 n02361337 marmot 鼠
337 n02363005 beaver 鼠
338 n02364673 guinea_pig 鼠
339 n02389026 sorrel 马
340 n02391049 zebra 斑马
341 n02395406 hog 猪
342 n02396427 wild_boar 猪
343 n02397096 warthog 猪
344 n02398521 hippopotamus 河马
345 n02403003 ox 牛
346 n02408429 water_buffalo 牛
347 n02410509 bison 牛
348 n02412080 ram 羊
349 n02415577 bighorn 羊
350 n02417914 ibex 羊
351 n02422106 hartebeest 羊
352 n02422699 impala 羊
353 n02423022 gazelle 羊
354 n02437312 Arabian_camel 骆驼
355 n02437616 llama 羊驼
356 n02441942 weasel 狸
357 n02442845 mink 狸
358 n02443114 polecat 狸
359 n02443484 black-footed_ferret 狸
360 n02444819 otter 狸
361 n02445715 skunk 狸
362 n02447366 badger 狸
363 n02454379 armadillo 穿山甲
364 n02457408 three-toed_sloth 树懒
365 n02480495 orangutan 狒狒
366 n02480855 gorilla 猩猩
367 n02481823 chimpanzee 猴子
368 n02483362 gibbon 猴子
369 n02483708 siamang 猴子
370 n02484975 guenon 猴子
371 n02486261 patas 猴子
372 n02486410 baboon 猴子
373 n02487347 macaque 猴子
374 n02488291 langur 猴子
375 n02488702 colobus 猴子
376 n02489166 proboscis_monkey 猴子
377 n02490219 marmoset 猴子
378 n02492035 capuchin 猴子
379 n02492660 howler_monkey 猴子
380 n02493509 titi 猴子
381 n02493793 spider_monkey 猴子
382 n02494079 squirrel_monkey 猴子
383 n02497673 Madagascar_cat 猴子
384 n02500267 indri 猴子
385 n02504013 Indian_elephant 大象
386 n02504458 African_elephant 大象
387 n02509815 lesser_panda 浣熊
388 n02510455 giant_panda 熊猫
389 n02514041 barracouta 鱼
390 n02526121 eel 鱼
391 n02536864 coho 鱼
392 n02606052 rock_beauty 鱼
393 n02607072 anemone_fish 鱼
394 n02640242 sturgeon 鱼
395 n02641379 gar 鱼
396 n02643566 lionfish 鱼
397 n02655020 puffer 鱼
398 n02666196 abacus 算盘
399 n02667093 abaya 穆斯林
400 n02669723 academic_gown 学士服
401 n02672831 accordion 手风琴
402 n02676566 acoustic_guitar 吉他
403 n02687172 aircraft_carrier 航空母舰
404 n02690373 airliner 飞机
405 n02692877 airship 飞艇
406 n02699494 altar 教堂
407 n02701002 ambulance 救护车
408 n02704792 amphibian 水陆两用车
409 n02708093 analog_clock 钟
410 n02727426 apiary 箱子
411 n02730930 apron 围裙
412 n02747177 ashcan 垃圾箱
413 n02749479 assault_rifle 枪
414 n02769748 backpack 背包
415 n02776631 bakery 面包柜
416 n02777292 balance_beam 体操
417 n02782093 balloon 热气球
418 n02783161 ballpoint 钢笔
419 n02786058 Band_Aid 邦迪
420 n02787622 banjo 乐器
421 n02788148 bannister 楼梯
422 n02790996 barbell 杠铃
423 n02791124 barber_chair 座椅
424 n02791270 barbershop 理发
425 n02793495 barn 木屋
426 n02794156 barometer 表
427 n02795169 barrel 酒桶
428 n02797295 barrow 手推车
429 n02799071 baseball 棒球
430 n02802426 basketball 篮球
431 n02804414 bassinet 婴儿
432 n02804610 bassoon 乐器
433 n02807133 bathing_cap 游泳
434 n02808304 bath_towel 婴儿毛巾
435 n02808440 bathtub 浴缸
436 n02814533 beach_wagon 轿车
437 n02814860 beacon 灯塔
438 n02815834 beaker 烧杯
439 n02817516 bearskin 守卫
440 n02823428 beer_bottle 啤酒
441 n02823750 beer_glass 啤酒
442 n02825657 bell_cote 建筑
443 n02834397 bib 围兜
444 n02835271 bicycle-built-for-two 双人自行车
445 n02837789 bikini 比基尼
446 n02840245 binder 笔记本
447 n02841315 binoculars 望远镜
448 n02843684 birdhouse 信箱
449 n02859443 boathouse 小屋
450 n02860847 bobsled 雪橇
451 n02865351 bolo_tie 项链
452 n02869837 bonnet 帽子
453 n02870880 bookcase 书柜
454 n02871525 bookshop 书店
455 n02877765 bottlecap 瓶盖
456 n02879718 bow 弓箭
457 n02883205 bow_tie 领结
458 n02892201 brass 墓碑
459 n02892767 brassiere 胸罩
460 n02894605 breakwater 海岸
461 n02895154 breastplate 盔甲
462 n02906734 broom 扫帚
463 n02909870 bucket 水桶
464 n02910353 buckle 皮带
465 n02916936 bulletproof_vest 防弹背心
466 n02917067 bullet_train 火车
467 n02927161 butcher_shop 肉铺
468 n02930766 cab 出租车
469 n02939185 caldron 锅
470 n02948072 candle 蜡烛
471 n02950826 cannon 炮
472 n02951358 canoe 艇
473 n02951585 can_opener 订书机
474 n02963159 cardigan 毛衣
475 n02965783 car_mirror 反光镜
476 n02966193 carousel 旋转木马
477 n02966687 carpenter’s_kit 工具箱
478 n02971356 carton 盒子
479 n02974003 car_wheel 轮胎
480 n02977058 cash_machine 取款机
481 n02978881 cassette 磁带
482 n02979186 cassette_player 磁带
483 n02980441 castle 城堡
484 n02981792 catamaran 帆船
485 n02988304 CD_player cd播放器
486 n02992211 cello 大提琴
487 n02992529 cellular_telephone 手机
488 n02999410 chain 铁链
489 n03000134 chainlink_fence 铁丝网
490 n03000247 chain_mail 铁丝网
491 n03000684 chain_saw 电锯
492 n03014705 chest 木箱
493 n03016953 chiffonier 木柜
494 n03017168 chime 锣鼓
495 n03018349 china_cabinet 柜子
496 n03026506 Christmas_stocking 袜子
497 n03028079 church 教堂
498 n03032252 cinema 剧院
499 n03041632 cleaver 刀
500 n03042490 cliff_dwelling 堡垒
501 n03045698 cloak 斗篷
502 n03047690 clog 鞋子
503 n03062245 cocktail_shaker 瓶子
504 n03063599 coffee_mug 杯子
505 n03063689 coffeepot 壶
506 n03065424 coil 螺旋
507 n03075370 combination_lock 锁
508 n03085013 computer_keyboard 键盘
509 n03089624 confectionery 糖果
510 n03095699 container_ship 船
511 n03100240 convertible 轿车
512 n03109150 corkscrew 开瓶器
513 n03110669 cornet 号(乐器)
514 n03124043 cowboy_boot 靴子
515 n03124170 cowboy_hat 帽子
516 n03125729 cradle 婴儿床
517 n03126707 crane 起重机
518 n03127747 crash_helmet 头盔
519 n03127925 crate 木箱
520 n03131574 crib 婴儿床
521 n03133878 Crock_Pot 电饭锅
522 n03134739 croquet_ball 推球
523 n03141823 crutch 拐杖
524 n03146219 cuirass 盔甲
525 n03160309 dam 水库
526 n03179701 desk 办公桌
527 n03180011 desktop_computer 电脑
528 n03187595 dial_telephone 电话机
529 n03188531 diaper 尿布
530 n03196217 digital_clock 闹钟
531 n03197337 digital_watch 手表
532 n03201208 dining_table 餐桌
533 n03207743 dishrag 垫子
534 n03207941 dishwasher 洗碗柜
535 n03208938 disk_brake 车轮
536 n03216828 dock 港口
537 n03218198 dogsled 雪橇
538 n03220513 dome 穹顶
539 n03223299 doormat 地毯
540 n03240683 drilling_platform 油田
541 n03249569 drum 鼓
542 n03250847 drumstick 鼓棒
543 n03255030 dumbbell 哑铃
544 n03259280 Dutch_oven 锅
545 n03271574 electric_fan 风扇
546 n03272010 electric_guitar 电吉他
547 n03272562 electric_locomotive 火车
548 n03290653 entertainment_center 电视机
549 n03291819 envelope 信
550 n03297495 espresso_maker 咖啡机
551 n03314780 face_powder 化妆品
552 n03325584 feather_boa 绒毛
553 n03337140 file 柜子
554 n03344393 fireboat 喷泉
555 n03345487 fire_engine 消防车
556 n03347037 fire_screen 壁炉
557 n03355925 flagpole 旗杆
558 n03372029 flute 笛子
559 n03376595 folding_chair 座椅
560 n03379051 football_helmet 橄榄球
561 n03384352 forklift 叉车
562 n03388043 fountain 喷泉
563 n03388183 fountain_pen 钢笔
564 n03388549 four-poster 床
565 n03393912 freight_car 火车
566 n03394916 French_horn 圆号
567 n03400231 frying_pan 平底锅
568 n03404251 fur_coat 裘皮
569 n03417042 garbage_truck 卡车
570 n03424325 gasmask 面具
571 n03425413 gas_pump 加油
572 n03443371 goblet 酒杯
573 n03444034 go-kart 卡丁车
574 n03445777 golf_ball 高尔夫
575 n03445924 golfcart 高尔夫车
576 n03447447 gondola 小船
577 n03447721 gong 锣鼓
578 n03450230 gown 婚纱
579 n03452741 grand_piano 钢琴
580 n03457902 greenhouse 大棚
581 n03459775 grille 轿车
582 n03461385 grocery_store 菜场
583 n03467068 guillotine 断头台
584 n03476684 hair_slide 发饰
585 n03476991 hair_spray 发蜡
586 n03478589 half_track 坦克
587 n03481172 hammer 榔头
588 n03482405 hamper 竹筒
589 n03483316 hand_blower 吹风机
590 n03485407 hand-held_computer pos机
591 n03485794 handkerchief 手帕
592 n03492542 hard_disc 硬盘
593 n03494278 harmonica 口风琴
594 n03495258 harp 竖琴
595 n03496892 harvester 起重机
596 n03498962 hatchet 斧头
597 n03527444 holster 手枪
598 n03529860 home_theater 电视机
599 n03530642 honeycomb 蜂巢
600 n03532672 hook 钩子
601 n03534580 hoopskirt 裙子
602 n03535780 horizontal_bar 体操
603 n03538406 horse_cart 马车
604 n03544143 hourglass 沙漏
605 n03584254 iPod 音乐播放器
606 n03584829 iron 电熨斗
607 n03590841 jack-o’-lantern 南瓜灯
608 n03594734 jean 牛仔裤
609 n03594945 jeep 吉普车
610 n03595614 jersey T恤
611 n03598930 jigsaw_puzzle 拼图
612 n03599486 jinrikisha 黄包车
613 n03602883 joystick 操纵杆
614 n03617480 kimono 和服
615 n03623198 knee_pad 护具
616 n03627232 knot 绳结
617 n03630383 lab_coat 医生
618 n03633091 ladle 勺子
619 n03637318 lampshade 灯
620 n03642806 laptop 笔记本电脑
621 n03649909 lawn_mower 割草机
622 n03657121 lens_cap 镜头盖
623 n03658185 letter_opener 小刀
624 n03661043 library 图书馆
625 n03662601 lifeboat 救生船
626 n03666591 lighter 打火机
627 n03670208 limousine 加长车
628 n03673027 liner 轮船
629 n03676483 lipstick 口红
630 n03680355 Loafer 鞋子
631 n03690938 lotion 护肤品
632 n03691459 loudspeaker 音响
633 n03692522 loupe 放大镜
634 n03697007 lumbermill 原木
635 n03706229 magnetic_compass 指南针
636 n03709823 mailbag 包
637 n03710193 mailbox 邮箱
638 n03710637 maillot 泳衣
639 n03710721 maillot 泳衣
640 n03717622 manhole_cover 窨井盖
641 n03720891 maraca 手摇铃
642 n03721384 marimba 木琴
643 n03724870 mask 面具
644 n03729826 matchstick 火柴
645 n03733131 maypole 绳子
646 n03733281 maze 迷宫
647 n03733805 measuring_cup 烧杯
648 n03742115 medicine_chest 冰箱
649 n03743016 megalith 石柱
650 n03759954 microphone 话筒
651 n03761084 microwave 微波炉
652 n03763968 military_uniform 军人
653 n03764736 milk_can 水壶
654 n03769881 minibus 小客车
655 n03770439 miniskirt 短裙
656 n03770679 minivan 面包车
657 n03773504 missile 导弹
658 n03775071 mitten 手套
659 n03775546 mixing_bowl 碗
660 n03776460 mobile_home 房车
661 n03777568 Model_T 老爷车
662 n03777754 modem 路由器
663 n03781244 monastery 建筑
664 n03782006 monitor 显示器
665 n03785016 moped 摩托车
666 n03786901 mortar 砚
667 n03787032 mortarboard 学士帽
668 n03788195 mosque 建筑
669 n03788365 mosquito_net 蚊帐
670 n03791053 motor_scooter 助动车
671 n03792782 mountain_bike 自行车
672 n03792972 mountain_tent 帐篷
673 n03793489 mouse 键盘鼠标
674 n03794056 mousetrap 捕鼠夹
675 n03796401 moving_van 货车
676 n03803284 muzzle 狗嘴套
677 n03804744 nail 钉子
678 n03814639 neck_brace 颈托
679 n03814906 necklace 项链
680 n03825788 nipple 奶瓶
681 n03832673 notebook 笔记本电脑
682 n03837869 obelisk 建筑
683 n03838899 oboe 黑管
684 n03840681 ocarina 埙
685 n03841143 odometer 仪表盘
686 n03843555 oil_filter 机油滤清器
687 n03854065 organ 管风琴
688 n03857828 oscilloscope 示波器
689 n03866082 overskirt 礼服
690 n03868242 oxcart 牛车
691 n03868863 oxygen_mask 呼吸器
692 n03871628 packet 零食
693 n03873416 paddle 划桨
694 n03874293 paddlewheel 水轮
695 n03874599 padlock 锁
696 n03876231 paintbrush 刷子
697 n03877472 pajama 睡衣
698 n03877845 palace 建筑
699 n03884397 panpipe 乐器
700 n03887697 paper_towel 纸巾
701 n03888257 parachute 降落伞
702 n03888605 parallel_bars 体操
703 n03891251 park_bench 长椅
704 n03891332 parking_meter 停车缴费器
705 n03895866 passenger_car 火车
706 n03899768 patio 院子
707 n03902125 pay-phone 公用电话
708 n03903868 pedestal 柱子
709 n03908618 pencil_box 文具袋
710 n03908714 pencil_sharpener 卷笔刀
711 n03916031 perfume 香水
712 n03920288 Petri_dish 培养皿
713 n03924679 photocopier 打印机
714 n03929660 pick 吉他拨片
715 n03929855 pickelhaube 头盔
716 n03930313 picket_fence 栅栏
717 n03930630 pickup 轿车
718 n03933933 pier 桥
719 n03935335 piggy_bank 储蓄罐
720 n03937543 pill_bottle 药丸
721 n03938244 pillow 枕头
722 n03942813 ping-pong_ball 乒乓球
723 n03944341 pinwheel 风车
724 n03947888 pirate 帆船
725 n03950228 pitcher 茶壶
726 n03954731 plane 刨子
727 n03956157 planetarium 建筑
728 n03958227 plastic_bag 塑料袋
729 n03961711 plate_rack 碗架
730 n03967562 plow 推土机
731 n03970156 plunger 搋子
732 n03976467 Polaroid_camera 相机
733 n03976657 pole 杆子
734 n03977966 police_van 警车
735 n03980874 poncho 披风
736 n03982430 pool_table 桌球
737 n03983396 pop_bottle 瓶子
738 n03991062 pot 盆栽
739 n03992509 potter’s_wheel 陶艺
740 n03995372 power_drill 钻机
741 n03998194 prayer_rug 毯子
742 n04004767 printer 打印机
743 n04005630 prison 监狱
744 n04008634 projectile 导弹
745 n04009552 projector 投影仪
746 n04019541 puck 冰球
747 n04023962 punching_bag 拳击
748 n04026417 purse 手提袋
749 n04033901 quill 羽毛笔
750 n04033995 quilt 床
751 n04037443 racer 赛车
752 n04039381 racket 网球
753 n04040759 radiator 加热器
754 n04041544 radio 收音机
755 n04044716 radio_telescope 卫星接收器
756 n04049303 rain_barrel 酒桶
757 n04065272 recreational_vehicle 房车
758 n04067472 reel 鱼竿
759 n04069434 reflex_camera 相机
760 n04070727 refrigerator 冰箱
761 n04074963 remote_control 遥控器
762 n04081281 restaurant 餐厅
763 n04086273 revolver 手枪
764 n04090263 rifle 狙击枪
765 n04099969 rocking_chair 摇椅
766 n04111531 rotisserie 烤箱
767 n04116512 rubber_eraser 橡皮
768 n04118538 rugby_ball 橄榄球
769 n04118776 rule 尺
770 n04120489 running_shoe 运动鞋
771 n04125021 safe 保险箱
772 n04127249 safety_pin 回形针
773 n04131690 saltshaker 调料瓶
774 n04133789 sandal 拖鞋
775 n04136333 sarong 长裙
776 n04141076 sax 萨克斯
777 n04141327 scabbard 剑
778 n04141975 scale 秤
779 n04146614 school_bus 校车
780 n04147183 schooner 帆船
781 n04149813 scoreboard 计分板
782 n04152593 screen 显示器
783 n04153751 screw 螺丝
784 n04154565 screwdriver 螺丝刀
785 n04162706 seat_belt 安全带
786 n04179913 sewing_machine 缝纫机
787 n04192698 shield 盾牌
788 n04200800 shoe_shop 鞋店
789 n04201297 shoji 榻榻米
790 n04204238 shopping_basket 购物篮
791 n04204347 shopping_cart 购物车
792 n04208210 shovel 铲子
793 n04209133 shower_cap 浴帽
794 n04209239 shower_curtain 浴帘
795 n04228054 ski 滑雪
796 n04229816 ski_mask 面罩
797 n04235860 sleeping_bag 睡袋
798 n04238763 slide_rule 游标卡尺
799 n04239074 sliding_door 移门
800 n04243546 slot 老虎机
801 n04251144 snorkel 游泳眼镜
802 n04252077 snowmobile 滑雪车
803 n04252225 snowplow 铲雪车
804 n04254120 soap_dispenser 洗手液
805 n04254680 soccer_ball 足球
806 n04254777 sock 袜子
807 n04258138 solar_dish 太阳能板
808 n04259630 sombrero 帽子
809 n04263257 soup_bowl 碗
810 n04264628 space_bar 键盘
811 n04265275 space_heater 电热器
812 n04266014 space_shuttle 航天飞船
813 n04270147 spatula 锅铲
814 n04273569 speedboat 快艇
815 n04275548 spider_web 蜘蛛网
816 n04277352 spindle 毛线
817 n04285008 sports_car 运动型轿车
818 n04286575 spotlight 探照灯
819 n04296562 stage 乐队
820 n04310018 steam_locomotive 蒸汽机车
821 n04311004 steel_arch_bridge 桥
822 n04311174 steel_drum 鼓
823 n04317175 stethoscope 听诊器
824 n04325704 stole 担架
825 n04326547 stone_wall 石堆
826 n04328186 stopwatch 秒表
827 n04330267 stove 火炉
828 n04332243 strainer 滤网
829 n04335435 streetcar 公交车
830 n04336792 stretcher 担架
831 n04344873 studio_couch 沙发
832 n04346328 stupa 皇宫
833 n04347754 submarine 轮船
834 n04350905 suit 西装
835 n04355338 sundial 日晷
836 n04355933 sunglass 墨镜
837 n04356056 sunglasses 墨镜
838 n04357314 sunscreen 防晒霜
839 n04366367 suspension_bridge 桥
840 n04367480 swab 拖把
841 n04370456 sweatshirt 连帽衫
842 n04371430 swimming_trunks 沙滩裤
843 n04371774 swing 秋千
844 n04372370 switch 开关
845 n04376876 syringe 针筒
846 n04380533 table_lamp 台灯
847 n04389033 tank 坦克
848 n04392985 tape_player 磁带播放器
849 n04398044 teapot 茶壶
850 n04399382 teddy 毛绒玩具
851 n04404412 television 电视机
852 n04409515 tennis_ball 网球
853 n04417672 thatch 草屋
854 n04418357 theater_curtain 幕布
855 n04423845 thimble 指套
856 n04428191 thresher 装甲车
857 n04429376 throne 皇位
858 n04435653 tile_roof 瓦片
859 n04442312 toaster 面包机
860 n04443257 tobacco_shop 烟酒店
861 n04447861 toilet_seat 马桶
862 n04456115 torch 火炬
863 n04458633 totem_pole 图腾
864 n04461696 tow_truck 大卡车
865 n04462240 toyshop 玩具店
866 n04465501 tractor 拖拉机
867 n04467665 trailer_truck 大货车
868 n04476259 tray 碟子
869 n04479046 trench_coat 风衣
870 n04482393 tricycle 儿童自行车
871 n04483307 trimaran 船
872 n04485082 tripod 三脚架
873 n04486054 triumphal_arch 拱门
874 n04487081 trolleybus 巴士
875 n04487394 trombone 长号
876 n04493381 tub 浴缸
877 n04501370 turnstile 闸机
878 n04505470 typewriter_keyboard 打字机
879 n04507155 umbrella 伞
880 n04509417 unicycle 独轮车
881 n04515003 upright 钢琴
882 n04517823 vacuum 吸尘器
883 n04522168 vase 花瓶
884 n04523525 vault 拱廊
885 n04525038 velvet 珊瑚绒
886 n04525305 vending_machine 自动贩卖机
887 n04532106 vestment 教皇袍
888 n04532670 viaduct 桥
889 n04536866 violin 小提琴
890 n04540053 volleyball 排球
891 n04542943 waffle_iron 煎饼锅
892 n04548280 wall_clock 挂钟
893 n04548362 wallet 钱夹
894 n04550184 wardrobe 柜子
895 n04552348 warplane 飞机
896 n04553703 washbasin 台盆
897 n04554684 washer 洗衣机
898 n04557648 water_bottle 水瓶
899 n04560804 water_jug 水壶
900 n04562935 water_tower 煤气包
901 n04579145 whiskey_jug 水壶
902 n04579432 whistle 哨子
903 n04584207 wig 头发
904 n04589890 window_screen 窗户
905 n04590129 window_shade 百叶窗
906 n04591157 Windsor_tie 领带
907 n04591713 wine_bottle 葡萄酒
908 n04592741 wing 飞机
909 n04596742 wok 炒锅
910 n04597913 wooden_spoon 勺子
911 n04599235 wool 围巾
912 n04604644 worm_fence 栅栏
913 n04606251 wreck 沉船
914 n04612504 yawl 帆船
915 n04613696 yurt 蒙古包
916 n06359193 web_site 网页
917 n06596364 comic_book 海报
918 n06785654 crossword_puzzle 填字游戏
919 n06794110 street_sign 交通标志
920 n06874185 traffic_light 交通灯
921 n07248320 book_jacket 书
922 n07565083 menu 菜单
923 n07579787 plate 菜
924 n07583066 guacamole 菜
925 n07584110 consomme 菜
926 n07590611 hot_pot 菜
927 n07613480 trifle 蛋糕
928 n07614500 ice_cream 冰激凌
929 n07615774 ice_lolly 棒冰
930 n07684084 French_loaf 面包
931 n07693725 bagel 甜甜圈
932 n07695742 pretzel 面包
933 n07697313 cheeseburger 汉堡
934 n07697537 hotdog 热狗
935 n07711569 mashed_potato 焗饭
936 n07714571 head_cabbage 蔬菜
937 n07714990 broccoli 西蓝花
938 n07715103 cauliflower 花椰菜
939 n07716358 zucchini 蔬菜
940 n07716906 spaghetti_squash 金瓜
941 n07717410 acorn_squash 南瓜
942 n07717556 butternut_squash 南瓜
943 n07718472 cucumber 黄瓜
944 n07718747 artichoke 蔬菜
945 n07720875 bell_pepper 青椒
946 n07730033 cardoon 花
947 n07734744 mushroom 蘑菇
948 n07742313 Granny_Smith 苹果
949 n07745940 strawberry 草莓
950 n07747607 orange 橙子
951 n07749582 lemon 柠檬
952 n07753113 fig 水果
953 n07753275 pineapple 菠萝
954 n07753592 banana 香蕉
955 n07754684 jackfruit 榴莲
956 n07760859 custard_apple 水果
957 n07768694 pomegranate 石榴
958 n07802026 hay 草垛
959 n07831146 carbonara 意大利面
960 n07836838 chocolate_sauce 甜品
961 n07860988 dough 面团
962 n07871810 meat_loaf 肉酱
963 n07873807 pizza 披萨
964 n07875152 potpie 派
965 n07880968 burrito 肉卷
966 n07892512 red_wine 红酒
967 n07920052 espresso 咖啡
968 n07930864 cup 茶
969 n07932039 eggnog 饮料杯
970 n09193705 alp 雪山
971 n09229709 bubble 泡泡
972 n09246464 cliff 悬崖
973 n09256479 coral_reef 珊瑚
974 n09288635 geyser 温泉
975 n09332890 lakeside 风景
976 n09399592 promontory 小岛
977 n09421951 sandbar 沙滩
978 n09428293 seashore 海滩
979 n09468604 valley 瀑布
980 n09472597 volcano 火山
981 n09835506 ballplayer 棒球
982 n10148035 groom 婚礼
983 n10565667 scuba_diver 潜水
984 n11879895 rapeseed 油菜花
985 n11939491 daisy 菊花
986 n12057211 yellow_lady’s_slipper 植物
987 n12144580 corn 玉米
988 n12267677 acorn 松果
989 n12620546 hip 植物
990 n12768682 buckeye 栗子
991 n12985857 coral_fungus 菌菇
992 n12998815 agaric 菌菇
993 n13037406 gyromitra 菌菇
994 n13040303 stinkhorn 菌菇
995 n13044778 earthstar 菌菇
996 n13052670 hen-of-the-woods 菌菇
997 n13054560 bolete 菌菇
998 n13133613 ear 玉米
999 n15075141 toilet_tissue 卷筒纸
使用脚本将数字编号和末尾中文删除
import codecs
import os
path = 'D:/code/yolov8-pytorch-master/voc_classes.txt' # 标签文件train路径
newFile = 'D:/code/yolov8-pytorch-master/voc_classesNew.txt'
# 读取路径下的txt文件
t = codecs.open(path, mode='r', encoding='utf-8')
line = t.readline() # 以行的形式进行读取文件
list1 = [] # 保存了信息列表
while line:
a = line.split()
list1.append(a)
line = t.readline()
t.close()
lt = open(newFile, "w")
newlist1 = list1
for num in range(0, len(newlist1)):
del newlist1[num][0]
del newlist1[num][2]
for num in range(0, len(newlist1)):
lt.writelines(' '.join(newlist1[num]) + '\n') # 每个元素以空格间隔,一行元素写完并换行
lt.close()
print(" 修改完成")
数据集介绍
数据集介绍