登錄ms-co-co數據集官網,一直不能進入,翻牆之后開看到下載鏈接。有了下載鏈接下載還是很快的,在我這兒晚上下載,速度能達到7M/s,所以也不上傳到網盤了,有需要的人等夜深人靜的時候下載效果更佳哦。
我把2017的數據集下載鏈接貼上來,linux下wget非常快,不知道為什么迅雷不能下載,順便說一下wget斷點續傳 wget -c http
coco數據集下載鏈接
各個鏈接的意思看鏈接里面的描述基本上就夠了。不過還在羅嗦一句,第一組是train數據,第二組是val驗證數據集,第三組是test驗證數據集。數據包括了物體檢測和keypoints身體關鍵點的檢測。
http://images.cocodataset.org/zips/train2017.zip
http://images.cocodataset.org/annotations/annotations_trainval2017.zip
http://images.cocodataset.org/zips/val2017.zip
http://images.cocodataset.org/annotations/stuff_annotations_trainval2017.zip
http://images.cocodataset.org/zips/test2017.zip
http://images.cocodataset.org/annotations/image_info_test2017.zip
這些就是全部的microsoft coco數據集2017的鏈接了。
cocoAPI,踩過的坑
coco數據集的注釋數據是以json格式存儲的,coco很貼心的配置了數據讀取的API,下載鏈接是github的:https://github.com/cocodataset/cocoapi
一般照着它的README文檔來做就ok了,但是我用得時候踩了一個坑:如果有用python3來調用它的API的時候,需要先在python3下已經安裝過cython(方法:pip3 install cython),然后修改makeconfig里的文件,將python修改為python3,然后再make就好了。
API自帶例子,按照例子來做基本上就沒應用什么應用這個api的問題了,因為我用到了單個人的圖片,所以貼一個單人的提取方法with python
#signal person photo in MSCOCO def load_data(self, dataDir, dataType, annType): annFile = '{}annotations/{}_{}.json'.format(dataDir, annType, dataType) self.coco = COCO(annFile) catID = self.coco.getCatIds(catNms=['person']) imgID = self.coco.getImgIds(catIds=catID) if self.signle: self.ids = [] for id in imgID: img = self.coco.loadImgs(id)[0] annID = self.coco.getAnnIds(imgIds=img['id']) anns = self.coco.loadAnns(annID) if len(anns) == 1: self.ids.append(id) else: self.ids = imgID # print('ok')
MPII數據集下載鏈接
順便貼一下MPII的數據集,mpii數據集不用翻牆也能看得到網頁鏈接,而且下載還很慢。先把鏈接貼過來。
http://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1.tar.gz
http://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1_u12_2.zip
http://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1_sequences_batch1.tar.gz
http://datasets.d2.mpi-inf.mpg.de/andriluka14cvpr/mpii_human_pose_v1_sequences_batch2.tar.gz