Skip to content

Commit f67627b

Browse files
authored
Add COCO demo.
1 parent a881ef8 commit f67627b

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed

README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,63 @@ python coco_visual.py --vis_num 1 \
185185

186186
</details>
187187

188+
#### COCO格式Object Instance示例
189+
<details>
190+
191+
```json
192+
{
193+
"info": {
194+
"year": 2022,
195+
"version": "1.0",
196+
"description": "For object detection",
197+
"date_created": "2022"
198+
},
199+
"licenses": [{
200+
"id": 1,
201+
"name": "Apache License v2.0",
202+
"url": "https://github.com/RapidAI/YOLO2COCO/LICENSE"
203+
}],
204+
"images": [{
205+
"date_captured": "2022",
206+
"file_name": "000000000001.jpg",
207+
"id": 1,
208+
"height": 224,
209+
"width": 224
210+
}, {
211+
"date_captured": "2022",
212+
"file_name": "000000000002.jpg",
213+
"id": 2,
214+
"height": 424,
215+
"width": 550
216+
}],
217+
"annotations": [{
218+
"segmentation": [[18.00, 2.99, 105.00, 2.99, 105.00, 89.00, 18.00, 89.00]],
219+
"area": 7482.011,
220+
"iscrowd": 0,
221+
"image_id": 1, # 对应images中的id
222+
"bbox": [18.00, 2.99, 87.00, 86.00], # [x, y, w, h]其中(x,y)是左上角的值,w,h是框的宽和高
223+
"category_id": 1, # 对应categories中的ID
224+
"id": 1 # 唯一区分不同标注实例的编号
225+
}, {
226+
"segmentation": [
227+
[126.99, 3.99, 210.99, 3.99, 210.99, 88.99, 126.99, 88.99]
228+
],
229+
"area": 7139.994,
230+
"iscrowd": 0,
231+
"image_id": 1,
232+
"bbox": [126.99, 3.99, 84.0, 84.99],
233+
"category_id": 1,
234+
"id": 2
235+
}],
236+
"categories": [{
237+
"supercategory": "stamp",
238+
"id": 1,
239+
"name": "stamp"
240+
}]
241+
}
242+
```
243+
244+
</details>
188245

189246
#### 相关资料
190247
- [MSCOCO数据标注详解](https://blog.csdn.net/wc781708249/article/details/79603522)

docs/README_en.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,63 @@ python coco_visual.py --vis_num 1 \
187187

188188
</details>
189189

190+
#### Object Instance demo of COCO
191+
<details>
192+
<summary>Click to expand</summary>
193+
194+
```json
195+
{
196+
"info": {
197+
"year": 2022,
198+
"version": "1.0",
199+
"description": "For object detection",
200+
"date_created": "2022"
201+
},
202+
"licenses": [{
203+
"id": 1,
204+
"name": "Apache License v2.0",
205+
"url": "https://github.com/RapidAI/YOLO2COCO/LICENSE"
206+
}],
207+
"images": [{
208+
"date_captured": "2022",
209+
"file_name": "000000000001.jpg",
210+
"id": 1,
211+
"height": 224,
212+
"width": 224
213+
}, {
214+
"date_captured": "2022",
215+
"file_name": "000000000002.jpg",
216+
"id": 2,
217+
"height": 424,
218+
"width": 550
219+
}],
220+
"annotations": [{
221+
"segmentation": [[18.00, 2.99, 105.00, 2.99, 105.00, 89.00, 18.00, 89.00]],
222+
"area": 7482.011,
223+
"iscrowd": 0,
224+
"image_id": 1, # Corresponding to the ID in images
225+
"bbox": [18.00, 2.99, 87.00, 86.00], # [x, y, w, h], (x,y) is the left top point of the box. w,h is the width and height of the box.
226+
"category_id": 1, # Corresponding to the ID in categories.
227+
"id": 1 # Number that uniquely distinguishes different dimension instances
228+
}, {
229+
"segmentation": [
230+
[126.99, 3.99, 210.99, 3.99, 210.99, 88.99, 126.99, 88.99]
231+
],
232+
"area": 7139.994,
233+
"iscrowd": 0,
234+
"image_id": 1,
235+
"bbox": [126.99, 3.99, 84.0, 84.99],
236+
"category_id": 1,
237+
"id": 2
238+
}],
239+
"categories": [{
240+
"supercategory": "stamp",
241+
"id": 1,
242+
"name": "stamp"
243+
}]
244+
}
245+
```
246+
</details>
190247

191248
#### Related information
192249
- [MSCOCO Data Annotation Details](https://blog.csdn.net/wc781708249/article/details/79603522)

0 commit comments

Comments
 (0)