Unverified Commit 6716fc51 authored by Francisco Massa's avatar Francisco Massa Committed by GitHub
Browse files

Make CocoDataset ids deterministically ordered (#868)

parent 9a481d0b
......@@ -49,7 +49,7 @@ class CocoCaptions(VisionDataset):
self.target_transform = target_transform
from pycocotools.coco import COCO
self.coco = COCO(annFile)
self.ids = list(self.coco.imgs.keys())
self.ids = list(sorted(self.coco.imgs.keys()))
def __getitem__(self, index):
"""
......@@ -98,7 +98,7 @@ class CocoDetection(VisionDataset):
self.target_transform = target_transform
from pycocotools.coco import COCO
self.coco = COCO(annFile)
self.ids = list(self.coco.imgs.keys())
self.ids = list(sorted(self.coco.imgs.keys()))
def __getitem__(self, index):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment