mmdetection源码解读(七)

mmdetection/data/coco/annotations/instances_train2017.json

以 `000000000009.jpg`这张图片为例,它的信息在.json文件中,以及整体结构如下

{

	"info":{"description": "COCO 2017 Dataset", "url": "http://cocodataset.org", "version": "1.0", "year": 2017, "contributor": "COCO Consortium", "data_created": "2017/09/01"}, 
	
	"licenses": [{"url": "http://creativecommons.org/licenses/by-nc-sa/2.0/", "id": 1, "name": "Attribution-NonCommercial-ShareAlike License"},
		     {"url": "http://creativecommons.org/licenses/by-nc/2.0/","id": 2,"name": "Attribution-NonCommercial License"},
		     {"url": "http://creativecommons.org/licenses/by-nc-nd/2.0/","id": 3,"name": "Attribution-NonCommercial-NoDerivs License"},
		     {"url": "http://creativecommons.org/licenses/by/2.0/","id": 4,"name": "Attribution License"},
		     {"url": "http://creativecommons.org/licenses/by-sa/2.0/","id": 5,"name": "Attribution-ShareAlike License"},
                     {"url": "http://creativecommons.org/licenses/by-nd/2.0/","id": 6,"name": "Attribution-NoDerivs License"},
                     {"url": "http://flickr.com/commons/usage/","id": 7,"name": "No known copyright restrictions"},
                     {"url": "http://www.usa.gov/copyright.shtml","id": 8,"name": "United States Government Work"}],
	
	"images":[{"license": 3,"file_name": "000000000009.jpg","coco_url": "http://images.cocodataset.org/train2017/000000000009.jpg","height": 480,"width": 640,"date_captured": "2013-11-19 20:40:11","flickr_url": "http://farm5.staticflickr.com/4026/4622125393_84c1fdb8d6_z.jpg","id": 9}],
	
	"annotations":[{"segmentation": [[500.49, 473.53, 599.73, 419.6, 612.67, 375.37, 608.36, 354.88, 528.54, 269.66, 457.35, 201.71, 420.67, 187.69, 389.39, 192.0, 19.42, 360.27, 1.08, 389.39, 2.16, 427.15, 20.49, 473.53]], "area": 120057.13925, "iscrowd": 0, "image_id": 9, "bbox": [1.08, 187.69, 611.59, 285.84], "category_id": 51, "id": 1038967},
		       {"segmentation": [[357.03, 69.03, 311.73, 15.1, 550.11, 4.31, 631.01, 62.56, 629.93, 88.45, 595.42, 185.53, 513.44, 230.83, 488.63, 232.99, 437.93, 190.92, 429.3, 189.84, 434.7, 148.85, 410.97, 121.89, 359.19, 74.43, 358.11, 65.8]], "area": 44434.751099999994, "iscrowd": 0, "image_id": 9, "bbox": [311.73, 4.31, 319.28, 228.68], "category_id": 51, "id": 1039564},
		       {"segmentation": [[249.6, 348.99, 267.67, 311.72, 291.39, 294.78, 304.94, 294.78, 326.4, 283.48, 345.6, 273.32, 368.19, 269.93, 385.13, 268.8, 388.52, 257.51, 393.04, 250.73, 407.72, 240.56, 425.79, 230.4, 441.6, 229.27, 447.25, 237.18, 447.25, 256.38, 456.28, 254.12, 475.48, 263.15, 486.78, 271.06, 495.81, 264.28, 498.07, 257.51, 500.33, 255.25, 507.11, 259.76, 513.88, 266.54, 513.88, 273.32, 513.88, 276.71, 526.31, 276.71, 526.31, 286.87, 519.53, 291.39, 519.53, 297.04, 524.05, 306.07, 525.18, 315.11, 529.69, 329.79, 529.69, 337.69, 530.82, 348.99, 536.47, 339.95, 545.51, 350.12, 555.67, 360.28, 557.93, 380.61, 561.32, 394.16, 565.84, 413.36, 522.92, 441.6, 469.84, 468.71, 455.15, 474.35, 307.2, 474.35, 316.24, 464.19, 330.92, 438.21, 325.27, 399.81, 310.59, 378.35, 301.55, 371.58, 252.99, 350.12]], "area": 49577.94434999999, "iscrowd": 0, "image_id": 9, "bbox": [249.6, 229.27, 316.24, 245.08], "category_id": 56, "id": 1058555},
			{"segmentation": [[434.48, 152.33, 433.51, 184.93, 425.44, 189.45, 376.7, 195.58, 266.94, 248.53, 179.78, 290.17, 51.62, 346.66, 16.43, 366.68, 1.9, 388.63, 0.0, 377.33, 0.0, 357.64, 0.0, 294.04, 22.56, 294.37, 56.14, 300.82, 83.58, 300.82, 109.08, 289.2, 175.26, 263.38, 216.9, 243.36, 326.34, 197.52, 387.03, 172.34, 381.54, 162.33, 380.89, 147.16, 380.89, 140.06, 370.89, 102.29, 330.86, 61.94, 318.91, 48.38, 298.57, 47.41, 287.28, 37.73, 259.51, 33.85, 240.14, 32.56, 240.14, 28.36, 247.57, 24.17, 271.46, 15.13, 282.11, 13.51, 296.96, 18.68, 336.34, 55.48, 391.55, 106.81, 432.87, 147.16], [62.46, 97.21, 130.25, 69.77, 161.25, 59.12, 183.52, 52.02, 180.94, 59.12, 170.93, 78.17, 170.28, 90.76, 157.05, 95.92, 130.25, 120.78, 119.92, 129.49, 102.17, 115.29, 64.72, 119.81, 0.0, 137.89, 0.0, 120.13, 0.0, 117.87]], "area": 24292.781700000007, "iscrowd": 0, "image_id": 9, "bbox": [0.0, 13.51, 434.48, 375.12], "category_id": 51, "id": 1534147},
			{"segmentation": [[376.2, 61.55, 391.86, 46.35, 424.57, 40.36, 441.62, 43.59, 448.07, 50.04, 451.75, 63.86, 448.07, 68.93, 439.31, 70.31, 425.49, 73.53, 412.59, 75.38, 402.92, 84.13, 387.71, 86.89, 380.8, 70.77]], "area": 2239.2924, "iscrowd": 0, "image_id": 9, "bbox": [376.2, 40.36, 75.55, 46.53], "category_id": 55, "id": 1913551},
			{"segmentation": [[473.92, 85.64, 469.58, 83.47, 465.78, 78.04, 466.87, 72.08, 472.84, 59.59, 478.26, 47.11, 496.71, 38.97, 514.62, 40.6, 521.13, 49.28, 523.85, 55.25, 520.05, 63.94, 501.06, 72.62, 482.6, 82.93]], "area": 1658.8913000000007, "iscrowd": 0, "image_id": 9, "bbox": [465.78, 38.97, 58.07, 46.67], "category_id": 55, "id": 1913746},
			{"segmentation": [[385.7, 85.85, 407.12, 80.58, 419.31, 79.26, 426.56, 77.94, 435.45, 74.65, 442.7, 73.66, 449.95, 73.99, 456.87, 77.94, 463.46, 83.87, 467.74, 92.77, 469.39, 104.63, 469.72, 117.15, 469.39, 135.27, 468.73, 141.86, 466.09, 144.17, 449.29, 141.53, 437.1, 136.92, 430.18, 129.67]], "area": 3609.3030499999995, "iscrowd": 0, "image_id": 9, "bbox": [385.7, 73.66, 84.02, 70.51], "category_id": 55, "id": 1913856},
			{"segmentation": [[458.81, 24.94, 437.61, 4.99, 391.48, 2.49, 364.05, 56.1, 377.77, 73.56, 377.77, 56.1, 392.73, 41.14, 403.95, 41.14, 420.16, 39.9, 435.12, 42.39, 442.6, 46.13, 455.06, 31.17]], "area": 2975.276, "iscrowd": 0, "image_id": 9, "bbox": [364.05, 2.49, 94.76, 71.07], "category_id": 55, "id": 1914001}],


	"categories": [{"supercategory": "person","id": 1,"name": "person"},
		       {"supercategory": "vehicle","id": 2,"name": "bicycle"},
		       {"supercategory": "vehicle","id": 3,"name": "car"},
			{"supercategory": "vehicle","id": 4,"name": "motorcycle"},
			{"supercategory": "vehicle","id": 5,"name": "airplane"},
			{"supercategory": "vehicle","id": 6,"name": "bus"},
			{"supercategory": "vehicle","id": 7,"name": "train"},
			{"supercategory": "vehicle","id": 8,"name": "truck"},
			{"supercategory": "vehicle","id": 9,"name": "boat"},
			{"supercategory": "outdoor","id": 10,"name": "traffic light"},
			{"supercategory": "outdoor","id": 11,"name": "fire hydrant"},
			{"supercategory": "outdoor","id": 13,"name": "stop sign"},
			{"supercategory": "outdoor","id": 14,"name": "parking meter"},
			{"supercategory": "outdoor","id": 15,"name": "bench"},
			{"supercategory": "animal","id": 16,"name": "bird"},
			{"supercategory": "animal","id": 17,"name": "cat"},
			{"supercategory": "animal","id": 18,"name": "dog"},
			{"supercategory": "animal","id": 19,"name": "horse"},
			{"supercategory": "animal","id": 20,"name": "sheep"},
			{"supercategory": "animal","id": 21,"name": "cow"},
			{"supercategory": "animal","id": 22,"name": "elephant"},
			{"supercategory": "animal","id": 23,"name": "bear"},
			{"supercategory": "animal","id": 24,"name": "zebra"},
			{"supercategory": "animal","id": 25,"name": "giraffe"},
			{"supercategory": "accessory","id": 27,"name": "backpack"},
			{"supercategory": "accessory","id": 28,"name": "umbrella"},
			{"supercategory": "accessory","id": 31,"name": "handbag"},
			{"supercategory": "accessory","id": 32,"name": "tie"},
			{"supercategory": "accessory","id": 33,"name": "suitcase"},
			{"supercategory": "sports","id": 34,"name": "frisbee"},
			{"supercategory": "sports","id": 35,"name": "skis"},
			{"supercategory": "sports","id": 36,"name": "snowboard"},
			{"supercategory": "sports","id": 37,"name": "sports ball"},
			{"supercategory": "sports","id": 38,"name": "kite"},
			{"supercategory": "sports","id": 39,"name": "baseball bat"},
			{"supercategory": "sports","id": 40,"name": "baseball glove"},
			{"supercategory": "sports","id": 41,"name": "skateboard"},
			{"supercategory": "sports","id": 42,"name": "surfboard"},
			{"supercategory": "sports","id": 43,"name": "tennis racket"},
			{"supercategory": "kitchen","id": 44,"name": "bottle"},
			{"supercategory": "kitchen","id": 46,"name": "wine glass"},
			{"supercategory": "kitchen","id": 47,"name": "cup"},
			{"supercategory": "kitchen","id": 48,"name": "fork"},
			{"supercategory": "kitchen","id": 49,"name": "knife"},
			{"supercategory": "kitchen","id": 50,"name": "spoon"},
			{"supercategory": "kitchen","id": 51,"name": "bowl"},
			{"supercategory": "food","id": 52,"name": "banana"},
			{"supercategory": "food","id": 53,"name": "apple"},
			{"supercategory": "food","id": 54,"name": "sandwich"},
			{"supercategory": "food","id": 55,"name": "orange"},
			{"supercategory": "food","id": 56,"name": "broccoli"},
			{"supercategory": "food","id": 57,"name": "carrot"},
			{"supercategory": "food","id": 58,"name": "hot dog"},
			{"supercategory": "food","id": 59,"name": "pizza"},
			{"supercategory": "food","id": 60,"name": "donut"},
			{"supercategory": "food","id": 61,"name": "cake"},
			{"supercategory": "furniture","id": 62,"name": "chair"},
			{"supercategory": "furniture","id": 63,"name": "couch"},
			{"supercategory": "furniture","id": 64,"name": "potted plant"},
			{"supercategory": "furniture","id": 65,"name": "bed"},
			{"supercategory": "furniture","id": 67,"name": "dining table"},
			{"supercategory": "furniture","id": 70,"name": "toilet"},
			{"supercategory": "electronic","id": 72,"name": "tv"},
			{"supercategory": "electronic","id": 73,"name": "laptop"},
			{"supercategory": "electronic","id": 74,"name": "mouse"},
			{"supercategory": "electronic","id": 75,"name": "remote"},
			{"supercategory": "electronic","id": 76,"name": "keyboard"},
			{"supercategory": "electronic","id": 77,"name": "cell phone"},
			{"supercategory": "appliance","id": 78,"name": "microwave"},
			{"supercategory": "appliance","id": 79,"name": "oven"},
			{"supercategory": "appliance","id": 80,"name": "toaster"},
			{"supercategory": "appliance","id": 81,"name": "sink"},
			{"supercategory": "appliance","id": 82,"name": "refrigerator"},
			{"supercategory": "indoor","id": 84,"name": "book"},
			{"supercategory": "indoor","id": 85,"name": "clock"},
			{"supercategory": "indoor","id": 86,"name": "vase"},
			{"supercategory": "indoor","id": 87,"name": "scissors"},
			{"supercategory": "indoor","id": 88,"name": "teddy bear"},
			{"supercategory": "indoor","id": 89,"name": "hair drier"},
			{"supercategory": "indoor","id": 90,"name": "toothbrush"}]


}

 参考博客

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值