open-images-v7.yaml 12 KB

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