首先,你得自由上网,接着,将下面的下载链接保存到urls.txt文件中,
https://storage.googleapis.com/quickdraw_dataset/full/binary/The%20Eiffel%20Tower.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/The%20Great%20Wall%20of%20China.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/The%20Mona%20Lisa.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/aircraft%20carrier.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/airplane.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/alarm%20clock.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ambulance.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/angel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/animal%20migration.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ant.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/anvil.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/apple.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/arm.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/asparagus.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/axe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/backpack.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/banana.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bandage.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/barn.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/baseball%20bat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/baseball.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/basket.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/basketball.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bathtub.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/beach.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bear.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/beard.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bed.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bee.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/belt.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bench.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bicycle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/binoculars.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bird.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/birthday%20cake.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/blackberry.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/blueberry.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/book.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/boomerang.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bottlecap.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bowtie.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bracelet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/brain.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bread.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bridge.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/broccoli.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/broom.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bucket.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bulldozer.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bus.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/bush.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/butterfly.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cactus.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cake.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/calculator.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/calendar.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/camel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/camera.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/camouflage.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/campfire.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/candle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cannon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/canoe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/car.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/carrot.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/castle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ceiling%20fan.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cell%20phone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cello.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/chair.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/chandelier.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/church.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/circle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/clarinet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/clock.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cloud.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/coffee%20cup.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/compass.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/computer.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cookie.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cooler.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/couch.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cow.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/crab.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/crayon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/crocodile.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/crown.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cruise%20ship.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/cup.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/diamond.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dishwasher.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/diving%20board.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dog.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dolphin.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/donut.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/door.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dragon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dresser.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/drill.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/drums.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/duck.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/dumbbell.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ear.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/elbow.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/elephant.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/envelope.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/eraser.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/eye.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/eyeglasses.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/face.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fan.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/feather.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fence.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/finger.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fire%20hydrant.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fireplace.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/firetruck.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fish.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/flamingo.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/flashlight.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/flip%20flops.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/floor%20lamp.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/flower.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/flying%20saucer.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/foot.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/fork.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/frog.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/frying%20pan.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/garden%20hose.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/garden.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/giraffe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/goatee.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/golf%20club.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/grapes.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/grass.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/guitar.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hamburger.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hammer.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hand.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/harp.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/headphones.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hedgehog.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/helicopter.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/helmet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hexagon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hockey%20puck.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hockey%20stick.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/horse.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hospital.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hot%20air%20balloon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hot%20dog.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hot%20tub.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hourglass.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/house%20plant.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/house.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/hurricane.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ice%20cream.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/jacket.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/jail.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/kangaroo.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/key.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/keyboard.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/knee.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/knife.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ladder.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lantern.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/laptop.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/leaf.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/leg.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/light%20bulb.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lighter.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lighthouse.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lightning.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/line.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lion.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lipstick.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lobster.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/lollipop.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mailbox.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/map.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/marker.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/matches.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/megaphone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mermaid.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/microphone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/microwave.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/monkey.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/moon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mosquito.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/motorbike.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mountain.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mouse.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/moustache.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mouth.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mug.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/mushroom.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/nail.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/necklace.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/nose.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/ocean.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/octagon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/octopus.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/onion.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/oven.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/owl.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/paint%20can.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/paintbrush.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/palm%20tree.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/panda.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pants.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/paper%20clip.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/parachute.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/parrot.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/passport.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/peanut.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pear.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/peas.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pencil.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/penguin.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/piano.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pickup%20truck.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/picture%20frame.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pig.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pillow.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pineapple.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pizza.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pliers.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/police%20car.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pond.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/pool.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/popsicle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/postcard.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/potato.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/power%20outlet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/purse.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rabbit.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/raccoon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/radio.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rain.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rainbow.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rake.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/remote%20control.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rhinoceros.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rifle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/river.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/roller%20coaster.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/rollerskates.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sailboat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sandwich.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/saw.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/saxophone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/school%20bus.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/scissors.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/scorpion.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/screwdriver.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sea%20turtle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/see%20saw.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/shark.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sheep.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/shoe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/shorts.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/shovel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sink.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/skateboard.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/skull.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/skyscraper.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sleeping%20bag.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/smiley%20face.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/snail.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/snake.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/snorkel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/snowflake.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/snowman.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/soccer%20ball.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sock.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/speedboat.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/spider.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/spoon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/spreadsheet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/square.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/squiggle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/squirrel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stairs.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/star.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/steak.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stereo.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stethoscope.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stitches.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stop%20sign.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/stove.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/strawberry.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/streetlight.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/string%20bean.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/submarine.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/suitcase.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sun.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/swan.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sweater.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/swing%20set.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/sword.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/syringe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/t-shirt.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/table.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/teapot.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/teddy-bear.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/telephone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/television.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tennis%20racquet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tent.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tiger.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/toaster.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/toe.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/toilet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tooth.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/toothbrush.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/toothpaste.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tornado.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tractor.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/traffic%20light.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/train.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/tree.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/triangle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/trombone.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/truck.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/trumpet.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/umbrella.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/underwear.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/van.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/vase.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/violin.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/washing%20machine.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/watermelon.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/waterslide.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/whale.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/wheel.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/windmill.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/wine%20bottle.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/wine%20glass.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/wristwatch.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/yoga.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/zebra.bin
https://storage.googleapis.com/quickdraw_dataset/full/binary/zigzag.bin
然后,使用下面的python代码下载就可以了,
#encoding:utf-8
import urllib.request as ur
import os
from urllib.parse import unquote
with open("urls.txt", "r") as fd:
lines = fd.readlines()
for line in lines:
line = line.replace("\n", "")
filename = line[line.rindex("/") + 1:]
filename = unquote(filename)
data = ur.urlopen(line, timeout=20).read()
with open(filename, "wb") as datafd:
datafd.write(data)
datafd.close()
print(filename)
下载结果:
如果想把图片数据读取出来并保存成图片,则使用下面的代码即可,
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import struct
from struct import unpack
from PIL import Image, ImageDraw
import os
class QuickDrawing():
"""
Represents a single Quick, Draw! drawing.
"""
def __init__(self, name, drawing_data):
self._name =name
self._drawing_data = drawing_data
self._strokes = None
self._image = None
@property
def name(self):
"""
Returns the name of the drawing (anvil, aircraft, ant, etc).
"""
return self._name
@property
def key_id(self):
"""
Returns the id of the drawing.
"""
return self._drawing_data["key_id"]
@property
def countrycode(self):
"""
Returns the country code for the drawing.
"""
return self._drawing_data["countrycode"].decode("utf-8")
@property
def recognized(self):
"""
Returns a boolean representing whether the drawing was recognized.
"""
return bool(self._drawing_data["recognized"])
@property
def timestamp(self):
"""
Returns the time the drawing was created (in seconds since the epoch).
"""
return self._drawing_data["timestamp"]
@property
def no_of_strokes(self):
"""
Returns the number of pen strokes used to create the drawing.
"""
return self._drawing_data["n_strokes"]
@property
def image_data(self):
"""
Returns the raw image data as list of strokes with a list of X
co-ordinates and a list of Y co-ordinates.
Co-ordinates are aligned to the top-left hand corner with values
from 0 to 255.
See https://github.com/googlecreativelab/quickdraw-dataset#simplified-drawing-files-ndjson
for more information regarding how the data is represented.
"""
return self._drawing_data["image"]
@property
def strokes(self):
"""
Returns a list of pen strokes containing a list of (x,y) coordinates which make up the drawing.
To iterate though the strokes data use::
from quickdraw import QuickDrawData
qd = QuickDrawData()
anvil = qd.get_drawing("anvil")
for stroke in anvil.strokes:
for x, y in stroke:
print("x={} y={}".format(x, y))
"""
# load the strokes
if self._strokes is None:
self._strokes = []
for stroke in self.image_data:
points = []
xs = stroke[0]
ys = stroke[1]
if len(xs) != len(ys):
raise Exception("something is wrong, different number of x's and y's")
for point in range(len(xs)):
x = xs[point]
y = ys[point]
points.append((x,y))
self._strokes.append(points)
return self._strokes
@property
def image(self):
"""
Returns a `PIL Image <https://pillow.readthedocs.io/en/3.0.x/reference/Image.html>`_
object of the drawing on a white background with a black drawing. Alternative image
parameters can be set using ``get_image()``.
To save the image you would use the ``save`` method::
from quickdraw import QuickDrawData
qd = QuickDrawData()
anvil = qd.get_drawing("anvil")
anvil.image.save("my_anvil.gif")
"""
if self._image is None:
self._image = self.get_image()
return self._image
def get_image(self, stroke_color=(0,0,0), stroke_width=2, bg_color=(255,255,255)):
"""
Get a `PIL Image <https://pillow.readthedocs.io/en/3.0.x/reference/Image.html>`_
object of the drawing.
:param list stroke_color:
A list of RGB (red, green, blue) values for the stroke color,
defaults to (0,0,0).
:param int stroke_color:
A width of the stroke, defaults to 2.
:param list bg_color:
A list of RGB (red, green, blue) values for the background color,
defaults to (255,255,255).
"""
image = Image.new("RGB", (255,255), color=bg_color)
image_draw = ImageDraw.Draw(image)
for stroke in self.strokes:
image_draw.line(stroke, fill=stroke_color, width=stroke_width)
return image
def __str__(self):
return "QuickDrawing key_id={}".format(self.key_id)
def unpack_drawing(file_handle):
key_id, = unpack('Q', file_handle.read(8))
country_code, = unpack('2s', file_handle.read(2))
recognized, = unpack('b', file_handle.read(1))
timestamp, = unpack('I', file_handle.read(4))
n_strokes, = unpack('H', file_handle.read(2))
image = []
for i in range(n_strokes):
n_points, = unpack('H', file_handle.read(2))
fmt = str(n_points) + 'B'
x = unpack(fmt, file_handle.read(n_points))
y = unpack(fmt, file_handle.read(n_points))
image.append((x, y))
return {
'key_id': key_id,
'country_code': country_code,
'recognized': recognized,
'timestamp': timestamp,
'image': image
}
def unpack_drawings(filename):
with open(filename, 'rb') as f:
while True:
try:
yield unpack_drawing(f)
except struct.error:
break
def load_bin_files(dir):
fileslist = []
for path, dirs, files in os.walk(dir):
for file in files:
fileslist.append(os.path.join(path, file))
return fileslist
if __name__ == "__main__":
bin_fileslist = load_bin_files("datasetbin")
datasetdir = "dataset"
if not os.path.exists(datasetdir):
os.mkdir(datasetdir)
for binfile in bin_fileslist:
class_name = binfile[binfile.rindex('/') + 1 : binfile.rindex(".bin")]
print(binfile, " ", class_name)
class_dir = os.path.join(datasetdir, class_name)
if not os.path.exists(class_dir):
os.mkdir(class_dir)
index = 0
for drawing in unpack_drawings(binfile):
# do something with the drawing
qt = QuickDrawing(class_name, drawing)
image = qt.get_image()
image.save(os.path.join(class_dir, str(index) + ".jpg"))
index = index + 1