Microsoft COCO: Common Objects in Context - 结果格式 (Results Format)

Microsoft COCO: Common Objects in Context - 结果格式 (Results Format)

http://cocodataset.org/#home
Home -> Evaluate -> Results Format


http://cocodataset.org/#format-results

Results Format
This page describes the results format used by COCO. The results format is similar for all annotation types and closely mimics the ground truth format detailed on the data format page. Please review the ground truth format before proceeding.
http://cocodataset.org/#format-data
本页面描述了 COCO 使用的结果格式。结果格式的一般结构类似于所有的注解类型 (annotation types),它们与数据格式页面上描述的 ground truth 的格式非常相似。我们建议在继续之前查看实际真值 (ground truth) 的格式。

Each algorithmically generated result, such as an object bounding box or segment, is stored separately in its own result struct. This singleton result struct must contains the id of the image from which the result was generated (a single image will typically have multiple associated results). Results for the whole dataset are aggregated in a single array. Finally, this entire result struct array is stored to disk as a single JSON file (save via gason in Matlab or json.dump in Python).
https://github.com/cocodataset/cocoapi/blob/master/MatlabAPI/gason.m
https://docs.python.org/2/library/json.html
每个算法生成的结果 (such as an object bounding box or segment) 都会分别存储在自己的结果结构中。这个单例结果结构必须包含从中产生结果的图像的 id (注意单个图像通常会有多个关联的结果)。整个数据集的结果汇总在一个结果数组中。最后,整个结果数组作为单个 JSON 文件存储到磁盘 (通过 Matlab 中的 gason 或 Python 中的 json.dump 保存)。

Example result JSON files are available in coco/results/ as part of the github package. Because the results format is similar to the ground truth annotation format, the CocoApi for accessing the ground truth can also be used to visualize and browse algorithm results. For details please see evalDemo (demo) and also loadRes() in the CocoApi.
示例结果 JSON 文件在coco/results/中,作为 github 包的一部分提供。因为结果格式类似于实际真值注释格式,所以用于访问实际真值的 CocoApi 也可以用来可视化和浏览算法结果。有关详细信息,请参阅 evalDemo (demo) 以及 CocoApi 中的 loadRes()。

The data struct for each of the result types is described below. The format of the individual fields below (category_id, bbox, segmentation, etc.) is the same as for the ground truth (for details see the data format page).
下面介绍每个结果类型的数据结构。下面的各个字段的格式 (category_id, bbox, segmentation, etc.) 与 ground truth 相同 (For details please see evalDemo (demo) and also loadRes() in the CocoApi.).

1. Object Detection
For detection with bounding boxes, please use the following format:

[{
"image_id" : int, "category_id" : int, "bbox" : [x,y,width,height], "score" : float,
}]

Note: box coordinates are floats measured from the top left image corner (and are 0-indexed). We recommend rounding coordinates to the nearest tenth of a pixel to reduce resulting JSON file size.
注意:框坐标是从左上角的图像角度测量的浮点数 (并且是 0 索引的)。我们建议将坐标舍入到最接近的十分之一像素,以减少生成的 JSON 文件大小。

For detection with object segments (instance segmentation), please use the following format:

[{
"image_id" : int, "category_id" : int, "segmentation" : RLE, "score" : float,
}]
Note: a binary mask containing an object segment should be encoded to RLE using the MaskApi function encode(). For additional details see either MaskApi.m or mask.py. Note that the core RLE code is written in c (see maskApi.h), so it is possible to perform encoding without using Matlab or Python, but we do not provide support for this case.
注意:包含 object segment 的二进制掩码应该使用 MaskApi 函数 encode() 编码为 RLE。有关更多详细信息,请参阅 MaskApi.m 或 mask.py. 请注意,核心 RLE 代码是用 C 编写的 (参见 maskApi.h),因此可以在不使用 Matlab 或 Python 的情况下执行编码,但是我们不支持这种情况。

2. Keypoint Detection

[{
"image_id" : int, "category_id" : int, "keypoints" : [x1,y1,v1,...,xk,yk,vk], "score" : float,
}]

Note: keypoint coordinates are floats measured from the top left image corner (and are 0-indexed). We recommend rounding coordinates to the nearest pixel to reduce file size. Note also that the visibility flags vi are not currently used (except for controlling visualization), we recommend simply setting vi=1.
注意:关键点坐标是从左上角图像角度测量的浮点数 (并且是 0 索引的)。我们建议将坐标舍入到最近的像素以减小文件大小。还要注意,当前并没有使用可见性标志vi (除了控制可视化),我们建议简单地设置 vi = 1。

3. Stuff Segmentation
[{
"image_id" : int, "category_id" : int, "segmentation" : RLE,
}]

The stuff segmentation format is identical to the object segmentation format except the score field is not necessary. Note: We recommend encoding each label that occurs in an image with a single binary mask. Binary masks should be encoded via RLE using the MaskApi function encode(). For an example see segmentationToCocoResult() in cocostuffhelper.py. We also provide conversion scripts between the JSON and png formats for convenience.
物体分割格式与对象分割格式相同,除了分数字段 (score field) 是不必要的。注意:我们建议使用单个二进制掩码对图像中出现的每个标签进行编码。二进制掩码应使用 MaskApi 函数 encode() 通过 RLE 进行编码。有关示例,请参阅 cocostuffhelper.py 中的 segmentationToCocoResult()。为方便起见,我们还提供了 JSON 和 png 格式之间的转换脚本。

4. Panoptic Segmentation
Details coming soon!

5. Image Captioning

[{
"image_id" : int, "caption" : str,
}]



猜你喜欢

转载自blog.csdn.net/chengyq116/article/details/80443526