COCO ããŒã¿ã»ãã
COCO(Common Objects in Context) ããŒã¿ã»ããã¯ã倧èŠæš¡ãªãªããžã§ã¯ãæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ããã£ãã·ã§ã³ä»ãã®ããŒã¿ã»ããã§ãããæ§ã ãªãªããžã§ã¯ãã«ããŽãªã®ç 究ã奚å±ããããã«èšèšãããŠãããã³ã³ãã¥ãŒã¿ããžã§ã³ã¢ãã«ã®ãã³ãããŒã¯ã«ãã䜿çšãããããªããžã§ã¯ãã®æ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ãããŒãºæšå®ã¿ã¹ã¯ã«åãçµãç 究è ãéçºè ã«ãšã£ãŠäžå¯æ¬ ãªããŒã¿ã»ããã§ãã
èŠããã ïŒ Ultralytics COCOããŒã¿ã»ããã®æŠèŠ
COCOåŠç¿æžã¿ã¢ãã«
ã¢ãã« | ãµã€ãº (ãã¯ã»ã«) |
mAPval 50-95 |
é床 CPU ONNX (ms) |
ã¹ããŒã T4TensorRT10 (ms) |
params (M) |
FLOPs (B) |
---|---|---|---|---|---|---|
YOLO11n | 640 | 39.5 | 56.1 ± 0.8 | 1.5 ± 0.0 | 2.6 | 6.5 |
YOLO11s | 640 | 47.0 | 90.0 ± 1.2 | 2.5 ± 0.0 | 9.4 | 21.5 |
YOLO11m | 640 | 51.5 | 183.2 ± 2.0 | 4.7 ± 0.1 | 20.1 | 68.0 |
YOLO11l | 640 | 53.4 | 238.6 ± 1.4 | 6.2 ± 0.1 | 25.3 | 86.9 |
YOLO11x | 640 | 54.7 | 462.8 ± 6.7 | 11.3 ± 0.2 | 56.9 | 194.9 |
äž»ãªç¹åŸŽ
- COCOã«ã¯33äžæã®ç»åãåé²ãããŠããã20äžæã®ç»åã«ã¯ç©äœæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ããã£ãã·ã§ã³ã®ã¿ã¹ã¯ã®ããã®ã¢ãããŒã·ã§ã³ãä»ããããŠããã
- ãã®ããŒã¿ã»ããã«ã¯ãè»ãèªè»¢è»ãåç©ãªã©ã®äžè¬çãªãªããžã§ã¯ããããåããã³ãããã°ãã¹ããŒãçšåãªã©ã®ç¹æ®ãªãªããžã§ã¯ããŸã§ã80ã®ãªããžã§ã¯ãã»ã«ããŽãªãå«ãŸããŠããã
- 泚éã«ã¯ãåç»åã®ãªããžã§ã¯ãã®ããŠã³ãã£ã³ã°ããã¯ã¹ãã»ã°ã¡ã³ããŒã·ã§ã³ãã¹ã¯ããã£ãã·ã§ã³ãå«ãŸããã
- COCOã¯ãç©äœæ€åºã®å¹³åå¹³å粟床(mAP)ãã»ã°ã¡ã³ããŒã·ã§ã³ã¿ã¹ã¯ã®å¹³ååçŸç(mAR)ã®ãããªæšæºåãããè©äŸ¡ææšãæäŸããã¢ãã«ã®æ§èœãæ¯èŒããã®ã«é©ããŠããã
ããŒã¿ã»ããæ§é
COCOããŒã¿ã»ããã¯3ã€ã®ãµãã»ããã«åãããŠããïŒ
- Train2017ïŒãã®ãµãã»ããã«ã¯ããªããžã§ã¯ãæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ããã£ãã·ã§ã³ã¢ãã«ã®ãã¬ãŒãã³ã°çšã®118Kç»åãå«ãŸããŠããŸãã
- Val2017ïŒãã®ãµãã»ããã«ã¯ãã¢ãã«ã®ãã¬ãŒãã³ã°äžã«æ€èšŒç®çã§äœ¿çšããã5Kç»åãå«ãŸããã
- Test2017ïŒãã®ãµãã»ããã¯ãåŠç¿æžã¿ã¢ãã«ã®ãã¹ããšãã³ãããŒã¯ã«äœ¿çšããã2äžæã®ç»åã§æ§æãããããã®ãµãã»ããã®ã°ã©ã³ããã¥ã«ãŒã¹ã¢ãããŒã·ã§ã³ã¯å ¬éãããŠããããçµæã¯æ§èœè©äŸ¡ã®ããã«COCOè©äŸ¡ãµãŒãã«æåºãããã
ã¢ããªã±ãŒã·ã§ã³
COCOããŒã¿ã»ããã¯ãç©äœæ€åºïŒYOLO ãFaster R-CNNãSSDãªã©ïŒãã€ã³ã¹ã¿ã³ã¹åå²ïŒMask R-CNNãªã©ïŒãããŒãã€ã³ãæ€åºïŒOpenPoseãªã©ïŒã®ãã£ãŒãã©ãŒãã³ã°ã¢ãã«ã®ãã¬ãŒãã³ã°ãè©äŸ¡ã«åºã䜿çšãããŠããŸãããã®ããŒã¿ã»ããã®å€æ§ãªãªããžã§ã¯ãã«ããŽãªãå€æ°ã®æ³šéä»ãç»åãæšæºåãããè©äŸ¡ææšã¯ãã³ã³ãã¥ãŒã¿ããžã§ã³ã®ç 究è ãå®å家ã«ãšã£ãŠäžå¯æ¬ ãªãªãœãŒã¹ãšãªã£ãŠããŸãã
ããŒã¿ã»ãã YAML
YAML (Yet Another Markup Language) ãã¡ã€ã«ã¯ããŒã¿ã»ããã®èšå®ãå®çŸ©ããããã«äœ¿ãããããã®ãã¡ã€ã«ã«ã¯ãããŒã¿ã»ããã®ãã¹ãã¯ã©ã¹ããã®ä»ã®é¢é£æ
å ±ãå«ãŸããŠãããCOCOããŒã¿ã»ããã®å Žå㯠coco.yaml
ãã¡ã€ã«ã¯ https://github.com/ultralytics/ultralytics/blob/main/ultralytics/cfg/datasets/coco.yaml.
ultralytics/cfg/datasets/coco.yaml
# Ultralytics YOLO ð, AGPL-3.0 license
# COCO 2017 dataset https://cocodataset.org by Microsoft
# Documentation: https://docs.ultralytics.com/datasets/detect/coco/
# Example usage: yolo train data=coco.yaml
# parent
# âââ ultralytics
# âââ datasets
# âââ coco â downloads here (20.1 GB)
# 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, ..]
path: ../datasets/coco # dataset root dir
train: train2017.txt # train images (relative to 'path') 118287 images
val: val2017.txt # val images (relative to 'path') 5000 images
test: test-dev2017.txt # 20288 of 40670 images, submit to https://competitions.codalab.org/competitions/20794
# Classes
names:
0: person
1: bicycle
2: car
3: motorcycle
4: airplane
5: bus
6: train
7: truck
8: boat
9: traffic light
10: fire hydrant
11: stop sign
12: parking meter
13: bench
14: bird
15: cat
16: dog
17: horse
18: sheep
19: cow
20: elephant
21: bear
22: zebra
23: giraffe
24: backpack
25: umbrella
26: handbag
27: tie
28: suitcase
29: frisbee
30: skis
31: snowboard
32: sports ball
33: kite
34: baseball bat
35: baseball glove
36: skateboard
37: surfboard
38: tennis racket
39: bottle
40: wine glass
41: cup
42: fork
43: knife
44: spoon
45: bowl
46: banana
47: apple
48: sandwich
49: orange
50: broccoli
51: carrot
52: hot dog
53: pizza
54: donut
55: cake
56: chair
57: couch
58: potted plant
59: bed
60: dining table
61: toilet
62: tv
63: laptop
64: mouse
65: remote
66: keyboard
67: cell phone
68: microwave
69: oven
70: toaster
71: sink
72: refrigerator
73: book
74: clock
75: vase
76: scissors
77: teddy bear
78: hair drier
79: toothbrush
# Download script/URL (optional)
download: |
from ultralytics.utils.downloads import download
from pathlib import Path
# Download labels
segments = True # segment or box labels
dir = Path(yaml['path']) # dataset root dir
url = 'https://github.com/ultralytics/assets/releases/download/v0.0.0/'
urls = [url + ('coco2017labels-segments.zip' if segments else 'coco2017labels.zip')] # labels
download(urls, dir=dir.parent)
# Download data
urls = ['http://images.cocodataset.org/zips/train2017.zip', # 19G, 118k images
'http://images.cocodataset.org/zips/val2017.zip', # 1G, 5k images
'http://images.cocodataset.org/zips/test2017.zip'] # 7G, 41k images (optional)
download(urls, dir=dir / 'images', threads=3)
䜿çšæ¹æ³
COCOããŒã¿ã»ããã§YOLO11nã¢ãã«ãç»åãµã€ãº640ã§100ãšããã¯åŠç¿ãããã«ã¯ã以äžã®ã³ãŒãã»ã¹ããããã䜿çšã§ããŸããå©çšå¯èœãªåŒæ°ã®å æ¬çãªãªã¹ãã«ã€ããŠã¯ãã¢ãã«ã®ãã¬ãŒãã³ã°ããŒãžãåç §ããŠãã ããã
åè»ã®äŸ
ãµã³ãã«ç»åãšæ³šé
COCOããŒã¿ã»ããã«ã¯ãæ§ã ãªãªããžã§ã¯ãã®ã«ããŽãªãšè€éãªã·ãŒã³ãæã€ç»åã®å€æ§ãªã»ãããå«ãŸããŠããŸããããã§ã¯ãããŒã¿ã»ããã«å«ãŸããç»åã®äŸãã察å¿ããã¢ãããŒã·ã§ã³ãšãšãã«çŽ¹ä»ããïŒ
- ã¢ã¶ã€ã¯ç»åïŒãã®ç»åã¯ã¢ã¶ã€ã¯åŠçãããããŒã¿ã»ããç»åã§æ§æããããã¬ãŒãã³ã°ãããã瀺ããã¢ã¶ã€ã¯åŠçãšã¯ãè€æ°ã®ç»åã1ã€ã®ç»åã«åæããããšã§ãåãã¬ãŒãã³ã°ãããå ã®ãªããžã§ã¯ããã·ãŒã³ã®çš®é¡ãå¢ããææ³ã§ããããã«ãããç°ãªããªããžã§ã¯ããµã€ãºãã¢ã¹ãã¯ãæ¯ãã³ã³ãã¯ã¹ãã«å¯Ÿããã¢ãã«ã®æ±åèœåãåäžãããããšãã§ããŸãã
ãã®äŸã§ã¯ãCOCOããŒã¿ã»ããã®ç»åã®å€æ§æ§ãšè€éããããã³åŠç¿ããã»ã¹ã§ã¢ã¶ã€ã¯åŠçã䜿çšããå©ç¹ã瀺ããŠããã
åŒçšãšè¬èŸ
COCOããŒã¿ã»ãããç 究éçºã«äœ¿çšããå Žåã¯ã以äžã®è«æãåŒçšããŠãã ããïŒ
@misc{lin2015microsoft,
title={Microsoft COCO: Common Objects in Context},
author={Tsung-Yi Lin and Michael Maire and Serge Belongie and Lubomir Bourdev and Ross Girshick and James Hays and Pietro Perona and Deva Ramanan and C. Lawrence Zitnick and Piotr Dollár},
year={2015},
eprint={1405.0312},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
COCOã³ã³ãœãŒã·ã¢ã ããã³ã³ãã¥ãŒã¿ããžã§ã³ã³ãã¥ããã£ã®ããã«ãã®è²ŽéãªãªãœãŒã¹ãäœæããç¶æããŠãããŠããããšã«æè¬ããããCOCOããŒã¿ã»ãããšãã®äœæè ã«ã€ããŠã®è©³çŽ°ã¯ãCOCOããŒã¿ã»ããã®ãŠã§ããµã€ããã芧ãã ããã
ããããã質å
COCOããŒã¿ã»ãããšã¯ã©ã®ãããªãã®ã§ããªãã³ã³ãã¥ãŒã¿ããžã§ã³ã«ãšã£ãŠéèŠãªã®ã§ããããïŒ
COCOããŒã¿ã»ããïŒCommon Objects in ContextïŒã¯ãç©äœæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ããã£ãã·ã§ã³ä»ãã«äœ¿çšããã倧èŠæš¡ãªããŒã¿ã»ããã§ãããCOCOããŒã¿ã»ããã«ã¯ã80ã®ãªããžã§ã¯ãã«ããŽãªã«å¯Ÿãã詳现ãªæ³šéãä»ãã330Kã®ç»åãå«ãŸããŠãããã³ã³ãã¥ãŒã¿ããžã§ã³ã¢ãã«ã®ãã³ãããŒã¯ããã¬ãŒãã³ã°ã«äžå¯æ¬ ã§ããå€æ§ãªã«ããŽãªãšå¹³åå¹³å粟床ïŒmAPïŒã®ãããªæšæºåãããè©äŸ¡ææšã«ãããç 究è ã¯COCOã䜿çšããŠããŸãã
COCOããŒã¿ã»ããã䜿ã£ãŠãYOLO ã¢ãã«ããã¬ãŒãã³ã°ããã«ã¯ïŒ
COCOããŒã¿ã»ããã䜿ã£ãŠYOLO11 ã¢ãã«ãèšç·Žããã«ã¯ã以äžã®ã³ãŒãã»ã¹ããããã䜿ãããšãã§ããïŒ
åè»ã®äŸ
å©çšå¯èœãªåŒæ°ã®è©³çŽ°ã«ã€ããŠã¯ããã¬ãŒãã³ã°ã®ããŒãžãåç §ããŠãã ããã
COCOããŒã¿ã»ããã®äž»ãªç¹åŸŽã¯ïŒ
COCOããŒã¿ã»ããã«ã¯ä»¥äžãå«ãŸããïŒ
- 330Kã®ç»åã200Kã¯ãªããžã§ã¯ãæ€åºãã»ã°ã¡ã³ããŒã·ã§ã³ããã£ãã·ã§ã³ã®ããã«ã¢ãããŒã·ã§ã³ãããŠããã
- è»ãåç©ã®ãããªäžè¬çãªãã®ããããã³ãããã°ãã¹ããŒãçšåã®ãããªç¹æ®ãªãã®ãŸã§ã80ã®ãªããžã§ã¯ãã»ã«ããŽãªãŒãããã
- ç©äœæ€åºïŒmAPïŒãšã»ã°ã¡ã³ããŒã·ã§ã³ïŒmARïŒã®æšæºåãããè©äŸ¡ææšã
- æ§ã ãªãªããžã§ã¯ãã®ãµã€ãºãã³ã³ãã¯ã¹ãã«ãŸããã£ãŠã¢ãã«ã®æ±åã匷åããããã«ããã¬ãŒãã³ã°ãããã«ã¢ã¶ã€ã¯ãããããã¯ããã¯ã
COCOããŒã¿ã»ããã§èšç·Žæžã¿ã®YOLO11 ã¢ãã«ã¯ã©ãã§æã«å ¥ããŸããïŒ
COCOããŒã¿ã»ããã®äºåèšç·Žæžã¿YOLO11 ã¢ãã«ã¯ãããã¥ã¡ã³ãã«èšèŒãããŠãããªã³ã¯ããããŠã³ããŒãã§ãããäŸã以äžã«ç€ºãïŒ
ãããã®ã¢ãã«ã¯ããµã€ãºãmAPãæšè«é床ãç°ãªããããããŸããŸãªããã©ãŒãã³ã¹ãšãªãœãŒã¹èŠä»¶ã«å¯Ÿå¿ãããªãã·ã§ã³ãæäŸããã
COCOããŒã¿ã»ããã¯ã©ã®ãããªæ§é ã«ãªã£ãŠããã®ã§ããïŒ
COCOããŒã¿ã»ããã¯3ã€ã®ãµãã»ããã«åãããŠããïŒ
- Train2017ïŒãã¬ãŒãã³ã°çšç»å118Kæã
- Val2017ïŒãã¬ãŒãã³ã°äžã®æ€èšŒçš5Kç»å
- Test2017ïŒåŠç¿æžã¿ã¢ãã«ã®ãã³ãããŒã¯çšã«20Kç»åãçšæãæ§èœè©äŸ¡ã®ãããçµæãCOCOè©äŸ¡ãµãŒãã«æåºããå¿ èŠãããã
ããŒã¿ã»ããã®YAMLèšå®ãã¡ã€ã«ã¯coco.yamlã«ããããã¹ãã¯ã©ã¹ãããŒã¿ã»ããã®è©³çŽ°ãå®çŸ©ããŠããã