open-images-v7.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661
  1. # Ultralytics YOLO 🚀, AGPL-3.0 license
  2. # Open Images v7 dataset https://storage.googleapis.com/openimages/web/index.html by Google
  3. # Example usage: yolo train data=open-images-v7.yaml
  4. # parent
  5. # ├── ultralytics
  6. # └── datasets
  7. # └── open-images-v7 ← downloads here (561 GB)
  8. # Train/val/test sets as 1) dir: path/to/imgs, 2) file: path/to/imgs.txt, or 3) list: [path/to/imgs1, path/to/imgs2, ..]
  9. path: ../datasets/open-images-v7 # dataset root dir
  10. train: images/train # train images (relative to 'path') 1743042 images
  11. val: images/val # val images (relative to 'path') 41620 images
  12. test: # test images (optional)
  13. # Classes
  14. names:
  15. 0: Accordion
  16. 1: Adhesive tape
  17. 2: Aircraft
  18. 3: Airplane
  19. 4: Alarm clock
  20. 5: Alpaca
  21. 6: Ambulance
  22. 7: Animal
  23. 8: Ant
  24. 9: Antelope
  25. 10: Apple
  26. 11: Armadillo
  27. 12: Artichoke
  28. 13: Auto part
  29. 14: Axe
  30. 15: Backpack
  31. 16: Bagel
  32. 17: Baked goods
  33. 18: Balance beam
  34. 19: Ball
  35. 20: Balloon
  36. 21: Banana
  37. 22: Band-aid
  38. 23: Banjo
  39. 24: Barge
  40. 25: Barrel
  41. 26: Baseball bat
  42. 27: Baseball glove
  43. 28: Bat (Animal)
  44. 29: Bathroom accessory
  45. 30: Bathroom cabinet
  46. 31: Bathtub
  47. 32: Beaker
  48. 33: Bear
  49. 34: Bed
  50. 35: Bee
  51. 36: Beehive
  52. 37: Beer
  53. 38: Beetle
  54. 39: Bell pepper
  55. 40: Belt
  56. 41: Bench
  57. 42: Bicycle
  58. 43: Bicycle helmet
  59. 44: Bicycle wheel
  60. 45: Bidet
  61. 46: Billboard
  62. 47: Billiard table
  63. 48: Binoculars
  64. 49: Bird
  65. 50: Blender
  66. 51: Blue jay
  67. 52: Boat
  68. 53: Bomb
  69. 54: Book
  70. 55: Bookcase
  71. 56: Boot
  72. 57: Bottle
  73. 58: Bottle opener
  74. 59: Bow and arrow
  75. 60: Bowl
  76. 61: Bowling equipment
  77. 62: Box
  78. 63: Boy
  79. 64: Brassiere
  80. 65: Bread
  81. 66: Briefcase
  82. 67: Broccoli
  83. 68: Bronze sculpture
  84. 69: Brown bear
  85. 70: Building
  86. 71: Bull
  87. 72: Burrito
  88. 73: Bus
  89. 74: Bust
  90. 75: Butterfly
  91. 76: Cabbage
  92. 77: Cabinetry
  93. 78: Cake
  94. 79: Cake stand
  95. 80: Calculator
  96. 81: Camel
  97. 82: Camera
  98. 83: Can opener
  99. 84: Canary
  100. 85: Candle
  101. 86: Candy
  102. 87: Cannon
  103. 88: Canoe
  104. 89: Cantaloupe
  105. 90: Car
  106. 91: Carnivore
  107. 92: Carrot
  108. 93: Cart
  109. 94: Cassette deck
  110. 95: Castle
  111. 96: Cat
  112. 97: Cat furniture
  113. 98: Caterpillar
  114. 99: Cattle
  115. 100: Ceiling fan
  116. 101: Cello
  117. 102: Centipede
  118. 103: Chainsaw
  119. 104: Chair
  120. 105: Cheese
  121. 106: Cheetah
  122. 107: Chest of drawers
  123. 108: Chicken
  124. 109: Chime
  125. 110: Chisel
  126. 111: Chopsticks
  127. 112: Christmas tree
  128. 113: Clock
  129. 114: Closet
  130. 115: Clothing
  131. 116: Coat
  132. 117: Cocktail
  133. 118: Cocktail shaker
  134. 119: Coconut
  135. 120: Coffee
  136. 121: Coffee cup
  137. 122: Coffee table
  138. 123: Coffeemaker
  139. 124: Coin
  140. 125: Common fig
  141. 126: Common sunflower
  142. 127: Computer keyboard
  143. 128: Computer monitor
  144. 129: Computer mouse
  145. 130: Container
  146. 131: Convenience store
  147. 132: Cookie
  148. 133: Cooking spray
  149. 134: Corded phone
  150. 135: Cosmetics
  151. 136: Couch
  152. 137: Countertop
  153. 138: Cowboy hat
  154. 139: Crab
  155. 140: Cream
  156. 141: Cricket ball
  157. 142: Crocodile
  158. 143: Croissant
  159. 144: Crown
  160. 145: Crutch
  161. 146: Cucumber
  162. 147: Cupboard
  163. 148: Curtain
  164. 149: Cutting board
  165. 150: Dagger
  166. 151: Dairy Product
  167. 152: Deer
  168. 153: Desk
  169. 154: Dessert
  170. 155: Diaper
  171. 156: Dice
  172. 157: Digital clock
  173. 158: Dinosaur
  174. 159: Dishwasher
  175. 160: Dog
  176. 161: Dog bed
  177. 162: Doll
  178. 163: Dolphin
  179. 164: Door
  180. 165: Door handle
  181. 166: Doughnut
  182. 167: Dragonfly
  183. 168: Drawer
  184. 169: Dress
  185. 170: Drill (Tool)
  186. 171: Drink
  187. 172: Drinking straw
  188. 173: Drum
  189. 174: Duck
  190. 175: Dumbbell
  191. 176: Eagle
  192. 177: Earrings
  193. 178: Egg (Food)
  194. 179: Elephant
  195. 180: Envelope
  196. 181: Eraser
  197. 182: Face powder
  198. 183: Facial tissue holder
  199. 184: Falcon
  200. 185: Fashion accessory
  201. 186: Fast food
  202. 187: Fax
  203. 188: Fedora
  204. 189: Filing cabinet
  205. 190: Fire hydrant
  206. 191: Fireplace
  207. 192: Fish
  208. 193: Flag
  209. 194: Flashlight
  210. 195: Flower
  211. 196: Flowerpot
  212. 197: Flute
  213. 198: Flying disc
  214. 199: Food
  215. 200: Food processor
  216. 201: Football
  217. 202: Football helmet
  218. 203: Footwear
  219. 204: Fork
  220. 205: Fountain
  221. 206: Fox
  222. 207: French fries
  223. 208: French horn
  224. 209: Frog
  225. 210: Fruit
  226. 211: Frying pan
  227. 212: Furniture
  228. 213: Garden Asparagus
  229. 214: Gas stove
  230. 215: Giraffe
  231. 216: Girl
  232. 217: Glasses
  233. 218: Glove
  234. 219: Goat
  235. 220: Goggles
  236. 221: Goldfish
  237. 222: Golf ball
  238. 223: Golf cart
  239. 224: Gondola
  240. 225: Goose
  241. 226: Grape
  242. 227: Grapefruit
  243. 228: Grinder
  244. 229: Guacamole
  245. 230: Guitar
  246. 231: Hair dryer
  247. 232: Hair spray
  248. 233: Hamburger
  249. 234: Hammer
  250. 235: Hamster
  251. 236: Hand dryer
  252. 237: Handbag
  253. 238: Handgun
  254. 239: Harbor seal
  255. 240: Harmonica
  256. 241: Harp
  257. 242: Harpsichord
  258. 243: Hat
  259. 244: Headphones
  260. 245: Heater
  261. 246: Hedgehog
  262. 247: Helicopter
  263. 248: Helmet
  264. 249: High heels
  265. 250: Hiking equipment
  266. 251: Hippopotamus
  267. 252: Home appliance
  268. 253: Honeycomb
  269. 254: Horizontal bar
  270. 255: Horse
  271. 256: Hot dog
  272. 257: House
  273. 258: Houseplant
  274. 259: Human arm
  275. 260: Human beard
  276. 261: Human body
  277. 262: Human ear
  278. 263: Human eye
  279. 264: Human face
  280. 265: Human foot
  281. 266: Human hair
  282. 267: Human hand
  283. 268: Human head
  284. 269: Human leg
  285. 270: Human mouth
  286. 271: Human nose
  287. 272: Humidifier
  288. 273: Ice cream
  289. 274: Indoor rower
  290. 275: Infant bed
  291. 276: Insect
  292. 277: Invertebrate
  293. 278: Ipod
  294. 279: Isopod
  295. 280: Jacket
  296. 281: Jacuzzi
  297. 282: Jaguar (Animal)
  298. 283: Jeans
  299. 284: Jellyfish
  300. 285: Jet ski
  301. 286: Jug
  302. 287: Juice
  303. 288: Kangaroo
  304. 289: Kettle
  305. 290: Kitchen & dining room table
  306. 291: Kitchen appliance
  307. 292: Kitchen knife
  308. 293: Kitchen utensil
  309. 294: Kitchenware
  310. 295: Kite
  311. 296: Knife
  312. 297: Koala
  313. 298: Ladder
  314. 299: Ladle
  315. 300: Ladybug
  316. 301: Lamp
  317. 302: Land vehicle
  318. 303: Lantern
  319. 304: Laptop
  320. 305: Lavender (Plant)
  321. 306: Lemon
  322. 307: Leopard
  323. 308: Light bulb
  324. 309: Light switch
  325. 310: Lighthouse
  326. 311: Lily
  327. 312: Limousine
  328. 313: Lion
  329. 314: Lipstick
  330. 315: Lizard
  331. 316: Lobster
  332. 317: Loveseat
  333. 318: Luggage and bags
  334. 319: Lynx
  335. 320: Magpie
  336. 321: Mammal
  337. 322: Man
  338. 323: Mango
  339. 324: Maple
  340. 325: Maracas
  341. 326: Marine invertebrates
  342. 327: Marine mammal
  343. 328: Measuring cup
  344. 329: Mechanical fan
  345. 330: Medical equipment
  346. 331: Microphone
  347. 332: Microwave oven
  348. 333: Milk
  349. 334: Miniskirt
  350. 335: Mirror
  351. 336: Missile
  352. 337: Mixer
  353. 338: Mixing bowl
  354. 339: Mobile phone
  355. 340: Monkey
  356. 341: Moths and butterflies
  357. 342: Motorcycle
  358. 343: Mouse
  359. 344: Muffin
  360. 345: Mug
  361. 346: Mule
  362. 347: Mushroom
  363. 348: Musical instrument
  364. 349: Musical keyboard
  365. 350: Nail (Construction)
  366. 351: Necklace
  367. 352: Nightstand
  368. 353: Oboe
  369. 354: Office building
  370. 355: Office supplies
  371. 356: Orange
  372. 357: Organ (Musical Instrument)
  373. 358: Ostrich
  374. 359: Otter
  375. 360: Oven
  376. 361: Owl
  377. 362: Oyster
  378. 363: Paddle
  379. 364: Palm tree
  380. 365: Pancake
  381. 366: Panda
  382. 367: Paper cutter
  383. 368: Paper towel
  384. 369: Parachute
  385. 370: Parking meter
  386. 371: Parrot
  387. 372: Pasta
  388. 373: Pastry
  389. 374: Peach
  390. 375: Pear
  391. 376: Pen
  392. 377: Pencil case
  393. 378: Pencil sharpener
  394. 379: Penguin
  395. 380: Perfume
  396. 381: Person
  397. 382: Personal care
  398. 383: Personal flotation device
  399. 384: Piano
  400. 385: Picnic basket
  401. 386: Picture frame
  402. 387: Pig
  403. 388: Pillow
  404. 389: Pineapple
  405. 390: Pitcher (Container)
  406. 391: Pizza
  407. 392: Pizza cutter
  408. 393: Plant
  409. 394: Plastic bag
  410. 395: Plate
  411. 396: Platter
  412. 397: Plumbing fixture
  413. 398: Polar bear
  414. 399: Pomegranate
  415. 400: Popcorn
  416. 401: Porch
  417. 402: Porcupine
  418. 403: Poster
  419. 404: Potato
  420. 405: Power plugs and sockets
  421. 406: Pressure cooker
  422. 407: Pretzel
  423. 408: Printer
  424. 409: Pumpkin
  425. 410: Punching bag
  426. 411: Rabbit
  427. 412: Raccoon
  428. 413: Racket
  429. 414: Radish
  430. 415: Ratchet (Device)
  431. 416: Raven
  432. 417: Rays and skates
  433. 418: Red panda
  434. 419: Refrigerator
  435. 420: Remote control
  436. 421: Reptile
  437. 422: Rhinoceros
  438. 423: Rifle
  439. 424: Ring binder
  440. 425: Rocket
  441. 426: Roller skates
  442. 427: Rose
  443. 428: Rugby ball
  444. 429: Ruler
  445. 430: Salad
  446. 431: Salt and pepper shakers
  447. 432: Sandal
  448. 433: Sandwich
  449. 434: Saucer
  450. 435: Saxophone
  451. 436: Scale
  452. 437: Scarf
  453. 438: Scissors
  454. 439: Scoreboard
  455. 440: Scorpion
  456. 441: Screwdriver
  457. 442: Sculpture
  458. 443: Sea lion
  459. 444: Sea turtle
  460. 445: Seafood
  461. 446: Seahorse
  462. 447: Seat belt
  463. 448: Segway
  464. 449: Serving tray
  465. 450: Sewing machine
  466. 451: Shark
  467. 452: Sheep
  468. 453: Shelf
  469. 454: Shellfish
  470. 455: Shirt
  471. 456: Shorts
  472. 457: Shotgun
  473. 458: Shower
  474. 459: Shrimp
  475. 460: Sink
  476. 461: Skateboard
  477. 462: Ski
  478. 463: Skirt
  479. 464: Skull
  480. 465: Skunk
  481. 466: Skyscraper
  482. 467: Slow cooker
  483. 468: Snack
  484. 469: Snail
  485. 470: Snake
  486. 471: Snowboard
  487. 472: Snowman
  488. 473: Snowmobile
  489. 474: Snowplow
  490. 475: Soap dispenser
  491. 476: Sock
  492. 477: Sofa bed
  493. 478: Sombrero
  494. 479: Sparrow
  495. 480: Spatula
  496. 481: Spice rack
  497. 482: Spider
  498. 483: Spoon
  499. 484: Sports equipment
  500. 485: Sports uniform
  501. 486: Squash (Plant)
  502. 487: Squid
  503. 488: Squirrel
  504. 489: Stairs
  505. 490: Stapler
  506. 491: Starfish
  507. 492: Stationary bicycle
  508. 493: Stethoscope
  509. 494: Stool
  510. 495: Stop sign
  511. 496: Strawberry
  512. 497: Street light
  513. 498: Stretcher
  514. 499: Studio couch
  515. 500: Submarine
  516. 501: Submarine sandwich
  517. 502: Suit
  518. 503: Suitcase
  519. 504: Sun hat
  520. 505: Sunglasses
  521. 506: Surfboard
  522. 507: Sushi
  523. 508: Swan
  524. 509: Swim cap
  525. 510: Swimming pool
  526. 511: Swimwear
  527. 512: Sword
  528. 513: Syringe
  529. 514: Table
  530. 515: Table tennis racket
  531. 516: Tablet computer
  532. 517: Tableware
  533. 518: Taco
  534. 519: Tank
  535. 520: Tap
  536. 521: Tart
  537. 522: Taxi
  538. 523: Tea
  539. 524: Teapot
  540. 525: Teddy bear
  541. 526: Telephone
  542. 527: Television
  543. 528: Tennis ball
  544. 529: Tennis racket
  545. 530: Tent
  546. 531: Tiara
  547. 532: Tick
  548. 533: Tie
  549. 534: Tiger
  550. 535: Tin can
  551. 536: Tire
  552. 537: Toaster
  553. 538: Toilet
  554. 539: Toilet paper
  555. 540: Tomato
  556. 541: Tool
  557. 542: Toothbrush
  558. 543: Torch
  559. 544: Tortoise
  560. 545: Towel
  561. 546: Tower
  562. 547: Toy
  563. 548: Traffic light
  564. 549: Traffic sign
  565. 550: Train
  566. 551: Training bench
  567. 552: Treadmill
  568. 553: Tree
  569. 554: Tree house
  570. 555: Tripod
  571. 556: Trombone
  572. 557: Trousers
  573. 558: Truck
  574. 559: Trumpet
  575. 560: Turkey
  576. 561: Turtle
  577. 562: Umbrella
  578. 563: Unicycle
  579. 564: Van
  580. 565: Vase
  581. 566: Vegetable
  582. 567: Vehicle
  583. 568: Vehicle registration plate
  584. 569: Violin
  585. 570: Volleyball (Ball)
  586. 571: Waffle
  587. 572: Waffle iron
  588. 573: Wall clock
  589. 574: Wardrobe
  590. 575: Washing machine
  591. 576: Waste container
  592. 577: Watch
  593. 578: Watercraft
  594. 579: Watermelon
  595. 580: Weapon
  596. 581: Whale
  597. 582: Wheel
  598. 583: Wheelchair
  599. 584: Whisk
  600. 585: Whiteboard
  601. 586: Willow
  602. 587: Window
  603. 588: Window blind
  604. 589: Wine
  605. 590: Wine glass
  606. 591: Wine rack
  607. 592: Winter melon
  608. 593: Wok
  609. 594: Woman
  610. 595: Wood-burning stove
  611. 596: Woodpecker
  612. 597: Worm
  613. 598: Wrench
  614. 599: Zebra
  615. 600: Zucchini
  616. # Download script/URL (optional) ---------------------------------------------------------------------------------------
  617. download: |
  618. from ultralytics.utils import LOGGER, SETTINGS, Path, is_ubuntu, get_ubuntu_version
  619. from ultralytics.utils.checks import check_requirements, check_version
  620. check_requirements('fiftyone')
  621. if is_ubuntu() and check_version(get_ubuntu_version(), '>=22.04'):
  622. # Ubuntu>=22.04 patch https://github.com/voxel51/fiftyone/issues/2961#issuecomment-1666519347
  623. check_requirements('fiftyone-db-ubuntu2204')
  624. import fiftyone as fo
  625. import fiftyone.zoo as foz
  626. import warnings
  627. name = 'open-images-v7'
  628. fraction = 1.0 # fraction of full dataset to use
  629. LOGGER.warning('WARNING ⚠️ Open Images V7 dataset requires at least **561 GB of free space. Starting download...')
  630. for split in 'train', 'validation': # 1743042 train, 41620 val images
  631. train = split == 'train'
  632. # Load Open Images dataset
  633. dataset = foz.load_zoo_dataset(name,
  634. split=split,
  635. label_types=['detections'],
  636. dataset_dir=Path(SETTINGS['datasets_dir']) / 'fiftyone' / name,
  637. max_samples=round((1743042 if train else 41620) * fraction))
  638. # Define classes
  639. if train:
  640. classes = dataset.default_classes # all classes
  641. # classes = dataset.distinct('ground_truth.detections.label') # only observed classes
  642. # Export to YOLO format
  643. with warnings.catch_warnings():
  644. warnings.filterwarnings("ignore", category=UserWarning, module="fiftyone.utils.yolo")
  645. dataset.export(export_dir=str(Path(SETTINGS['datasets_dir']) / name),
  646. dataset_type=fo.types.YOLOv5Dataset,
  647. label_field='ground_truth',
  648. split='val' if split == 'validation' else split,
  649. classes=classes,
  650. overwrite=train)