f[^ZbguCOCOvɂĐB33̃J[ʐ^itxt20ȏj̉摜f[^ƃAme[VitxjŃ_E[hłǍm^ZOe[VAL[|Cgo^pALvV쐬ȂǂɗpłB
@Microsoft COCOiCommon Objects in Contextj́A33itxt͖20ȏAc̖12͋txȂj̑K͂ȁuJ[ʐ^v̉摜f[^Zbgłi}1jB
@ȗpri^XNj́A
ƂȂĂB^XN̎QlƂāAႦ2020NɍsꂽCOCOpRyeBVɈȉ̂̂B
@COCOł͂܂܂Ȏނ̃ZOe[V^XNŃRyeBVsĂBL2020Nɂ́AInstance SegmentationPanoptic Segmentation2ނsꂽB2019Nɂ́AuStuff SegmentationvƂ^XNsĂB
@ȂAX^btiStuffjƂ́AKXAǁAAȂǖ`̐ȂmwÁiObjectAThingFlAԁALȂǕIɌ`鐔郂mjƂ͋ʂBStuff SegmentationƂ́AX^btɑZ}eBbNZOe[Visemantic segmentationĵƂłÂɑZOe[VłInstance SegmentationƂ͋ʂBȂ݂ɏLPanoptic SegmentatiońAX^btƕ̗̂ɑΉV[ZOe[Viscene segmentationĵƂłB
@f[^ZbǵA摜f[^ƁAɑ鋳txłAme[VɕAɂ炪PiTrainj^iValj^eXgiTestjɂ炩ߕĂBCOCO͖N̂悤ɃAbvf[gĂA̓Iɂ͈ȉ̂悤ɍXVĂB
@ڂ́uCOCǑ_E[hy[WvQƂĂقB
@COCO̗pKɂƁACOCỎ摜gpꍇ́AFlickr̗pKɏ]KvƂ̂ƁB摜t@CƂCreative Commonŝꂩ̃CZX蓖ĂĂȀAme[VɊ܂܂ĂB
@f[^ZbgɊւ錤eQƂۂɎg_ȉɂ܂Ƃ߂ĂB
@ۂCOCOgɂ́ATensorFlowPyTorchƂeCu@\𗘗p邱Ƃ߂BȉɁAꂼ̃CuŁuǂ̂悤ȃR[hCOCOg邩v̓T^IȃR[hȒPɎĂiR[h̏ڍׂ͉ȂjB
# !pip install tensorflow-datasets # CuuTensorFlow DatasetsvCXg[
import tensorflow_datasets as tfds
coco2017_train = tfds.load(name="coco/2017", split="train")
coco2014_captions_train = tfds.load(name="coco_captions/2014", split="train")
@TensorFlow DatasetsŎgpłf[^ZbǵATensorFlow Datasetsɂ܂Ƃ߂ĂAtensorflow_datasetsW[itfdsjload()痘płBCOCOf[^ZbǵA2ނĂB
@IɃ_E[hłȂdlȂ̂ŁAOɌq́u_E[h@vɎ@ŁAp摜f[^ƃAme[V̗_E[hāACӂ̃tH_[iႦΉ摜f[^u./images/train2017/vɁAAme[Vu./annotations/vjɔzuĂKvB
# !pip install torch torchvision # CuuPyTorchvCXg[
import torch
import torchvision
coco_det_data = torchvision.datasets.CocoDetection(
'./images/train2017', annFile='./annotations/instances_train2017.json',
transform=torchvision.transforms.ToTensor())
coco_cap_data = torchvision.datasets.CocoCaptions(
'./images/train2017', annFile='./annotations/captions_train2017.json',
transform=torchvision.transforms.ToTensor())
data_loader_det = torch.utils.data.DataLoader(coco_det_data, batch_size=4, shuffle=True)
data_loader_cap = torch.utils.data.DataLoader(coco_cap_data, batch_size=4, shuffle=True)
@torchvision.datasetsOԂ́A
ꂩ̃NX̃RXgN^[iɂ__init__jŃf[^Zbg̃IuWFNgăf[^_E[hAtorch.utils.data.DataLoaderNX̃RXgN^[Ńf[^[_[̃IuWFNgăf[^[hB
@COCÓAĽy[W_E[hłB̓Iȃ_E[h@́AÑy[Wɂ菇ɏ]ĂقB
Copyright© Digital Advantage Corp. All Rights Reserved.