From 1aff09a3acf7bb80e086b4f6285a3dba9c096344 Mon Sep 17 00:00:00 2001 From: Zoya Maslova Date: Tue, 1 Jun 2021 09:15:33 +0300 Subject: [PATCH] update COCO format documentation (#3197) * update COCO format documentation * change place of COCO docs changes * fix line length Co-authored-by: Nikita Manovich --- CHANGELOG.md | 1 + .../format-specifications/format-coco.md | 30 +++++++------------ 2 files changed, 12 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81c873fc..cdd0c1ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated manifest format, added meta with related images () +- Update of COCO format documentation () ### Deprecated diff --git a/site/content/en/docs/for-users/formats/format-specifications/format-coco.md b/site/content/en/docs/for-users/formats/format-specifications/format-coco.md index a5aa8279..622a719d 100644 --- a/site/content/en/docs/for-users/formats/format-specifications/format-coco.md +++ b/site/content/en/docs/for-users/formats/format-specifications/format-coco.md @@ -5,21 +5,11 @@ weight: 5 ### [MS COCO Object Detection](http://cocodataset.org/#format-data) -- [Format specification](http://cocodataset.org/#format-data) +- [Format specification](https://github.com/openvinotoolkit/datumaro/blob/develop/docs/formats/coco_user_manual.md#format-specification) #### COCO export -Downloaded file: a zip archive with following structure: - -```bash -archive.zip/ -├── images/ -│ ├── -│ ├── -│ └── ... -└── annotations/ - └── instances_default.json -``` +Downloaded file: a zip archive with the structure described [here](https://github.com/openvinotoolkit/datumaro/blob/develop/docs/formats/coco_user_manual.md#load-coco-dataset) - supported annotations: Polygons, Rectangles - supported attributes: @@ -31,7 +21,8 @@ archive.zip/ - `score` (number) - the annotation `score` field - arbitrary attributes - will be stored in the `attributes` annotation section -_Note_: there is also a [support for COCO keypoints over Datumaro](https://github.com/openvinotoolkit/cvat/issues/2910#issuecomment-726077582) +Support for COCO tasks via Datumaro is described [here](https://github.com/openvinotoolkit/datumaro/blob/develop/docs/formats/coco_user_manual.md#export-to-coco) +For example, [support for COCO keypoints over Datumaro](https://github.com/openvinotoolkit/cvat/issues/2910#issuecomment-726077582): 1. Install [Datumaro](https://github.com/openvinotoolkit/datumaro) `pip install datumaro` @@ -44,16 +35,17 @@ keypoint lists (without the `visibility` COCO flag). #### COCO import -Uploaded file: a single unpacked `*.json` or a zip archive with the structure above (without images). +Uploaded file: a single unpacked `*.json` or a zip archive with the structure described +[here](https://github.com/openvinotoolkit/datumaro/blob/develop/docs/formats/coco_user_manual.md#load-coco-dataset) +(without images). - supported annotations: Polygons, Rectangles (if the `segmentation` field is empty) #### How to create a task from MS COCO dataset -1. Download the [MS COCO dataset](http://cocodataset.org/#download). +1. Download the [MS COCO dataset](https://github.com/openvinotoolkit/datumaro/blob/develop/docs/formats/coco_user_manual.md#load-COCO-dataset). - For example [2017 Val images](http://images.cocodataset.org/zips/val2017.zip) - and [2017 Train/Val annotations](http://images.cocodataset.org/annotations/annotations_trainval2017.zip). + For example `val images` and `instances` annotations 1. Create a CVAT task with the following labels: @@ -61,12 +53,12 @@ Uploaded file: a single unpacked `*.json` or a zip archive with the structure ab person bicycle car motorcycle airplane bus train truck boat "traffic light" "fire hydrant" "stop sign" "parking meter" bench bird cat dog horse sheep cow elephant bear zebra giraffe backpack umbrella handbag tie suitcase frisbee skis snowboard "sports ball" kite "baseball bat" "baseball glove" skateboard surfboard "tennis racket" bottle "wine glass" cup fork knife spoon bowl banana apple sandwich orange broccoli carrot "hot dog" pizza donut cake chair couch "potted plant" bed "dining table" toilet tv laptop mouse remote keyboard "cell phone" microwave oven toaster sink refrigerator book clock vase scissors "teddy bear" "hair drier" toothbrush ``` -1. Select val2017.zip as data +1. Select `val2017.zip` as data (See [Creating an annotation task](/docs/for-users/user-guide/creating_an_annotation_task/) guide for details) 1. Unpack `annotations_trainval2017.zip` 1. click `Upload annotation` button, - choose `COCO 1.1` and select `instances_val2017.json.json` + choose `COCO 1.1` and select `instances_val2017.json` annotation file. It can take some time.