@@ -46,42 +46,42 @@ can load an image from "file_name" if the "image" field is not available.
4646+ ` sem_seg_file_name ` : the full path to the ground truth semantic segmentation file.
4747+ ` image ` : the image as a numpy array.
4848+ ` sem_seg ` : semantic segmentation ground truth in a 2D numpy array. Values in the array represent
49- category labels.
49+ category labels.
5050+ ` height ` , ` width ` : integer. The shape of image.
5151+ ` image_id ` (str): a string to identify this image. Mainly used during evaluation to identify the
52- image. Each dataset may use it for different purposes.
52+ image. Each dataset may use it for different purposes.
5353+ ` annotations ` (list[ dict] ): the per-instance annotations of every
54- instance in this image. Each annotation dict may contain:
55- + `bbox` (list[float]): list of 4 numbers representing the bounding box of the instance.
56- + `bbox_mode` (int): the format of bbox.
57- It must be a member of
58- [structures.BoxMode](../modules/structures.html#detectron2.structures.BoxMode).
59- Currently supports: `BoxMode.XYXY_ABS`, `BoxMode.XYWH_ABS`.
60- + `category_id` (int): an integer in the range [0, num_categories) representing the category label.
61- The value num_categories is reserved to represent the "background" category, if applicable.
62- + `segmentation` (list[list[float]] or dict):
63- + If `list[list[float]]`, it represents a list of polygons, one for each connected component
64- of the object. Each `list[float]` is one simple polygon in the format of `[x1, y1, ..., xn, yn]`.
65- The Xs and Ys are either relative coordinates in [0, 1], or absolute coordinates,
66- depend on whether "bbox_mode" is relative.
67- + If `dict`, it represents the per-pixel segmentation mask in COCO's RLE format.
68- + `keypoint`s (list[float]): in the format of [x1, y1, v1,..., xn, yn, vn].
69- v[i] means the visibility of this keypoint.
70- `n` must be equal to the number of keypoint categories.
71- The Xs and Ys are either relative coordinates in [0, 1], or absolute coordinates,
72- depend on whether "bbox_mode" is relative.
73-
74- Note that the coordinate annotations in COCO format are integers in range [0, H-1 or W-1].
75- By default, detectron2 adds 0.5 to absolute keypoint coordinates to convert them from discrete
54+ instance in this image. Each annotation dict may contain:
55+ + ` bbox ` (list[ float] ): list of 4 numbers representing the bounding box of the instance.
56+ + ` bbox_mode ` (int): the format of bbox.
57+ It must be a member of
58+ [ structures.BoxMode] ( ../modules/structures.html#detectron2.structures.BoxMode ) .
59+ Currently supports: ` BoxMode.XYXY_ABS ` , ` BoxMode.XYWH_ABS ` .
60+ + ` category_id ` (int): an integer in the range [ 0, num_categories) representing the category label.
61+ The value num_categories is reserved to represent the "background" category, if applicable.
62+ + ` segmentation ` (list[ list[ float]] or dict):
63+ + If ` list[list[float]] ` , it represents a list of polygons, one for each connected component
64+ of the object. Each ` list[float] ` is one simple polygon in the format of ` [x1, y1, ..., xn, yn] ` .
65+ The Xs and Ys are either relative coordinates in [ 0, 1] , or absolute coordinates,
66+ depend on whether "bbox_mode" is relative.
67+ + If ` dict ` , it represents the per-pixel segmentation mask in COCO's RLE format.
68+ + ` keypoint ` s (list[ float] ): in the format of [ x1, y1, v1,..., xn, yn, vn] .
69+ v[ i] means the visibility of this keypoint.
70+ ` n ` must be equal to the number of keypoint categories.
71+ The Xs and Ys are either relative coordinates in [ 0, 1] , or absolute coordinates,
72+ depend on whether "bbox_mode" is relative.
73+
74+ Note that the coordinate annotations in COCO format are integers in range [ 0, H-1 or W-1] .
75+ By default, detectron2 adds 0.5 to absolute keypoint coordinates to convert them from discrete
7676 pixel indices to floating point coordinates.
77- + `iscrowd`: 0 or 1. Whether this instance is labeled as COCO's "crowd region".
77+ + ` iscrowd ` : 0 or 1. Whether this instance is labeled as COCO's "crowd region".
7878+ ` proposal_boxes ` (array): 2D numpy array with shape (K, 4) representing K precomputed proposal boxes for this image.
7979+ ` proposal_objectness_logits ` (array): numpy array with shape (K, ), which corresponds to the objectness
80- logits of proposals in 'proposal_boxes'.
80+ logits of proposals in 'proposal_boxes'.
8181+ ` proposal_bbox_mode ` (int): the format of the precomputed proposal bbox.
82- It must be a member of
83- [ structures.BoxMode] ( ../modules/structures.html#detectron2.structures.BoxMode ) .
84- Default format is ` BoxMode.XYXY_ABS ` .
82+ It must be a member of
83+ [ structures.BoxMode] ( ../modules/structures.html#detectron2.structures.BoxMode ) .
84+ Default format is ` BoxMode.XYXY_ABS ` .
8585
8686
8787If your dataset is already in the COCO format, you can simply register it by
@@ -146,12 +146,14 @@ Some additional metadata that are specific to the evaluation of certain datasets
146146* ` stuff_dataset_id_to_contiguous_id ` (dict[ int->int] ): Used when generating prediction json files for
147147 semantic/panoptic segmentation.
148148 A mapping from semantic segmentation class ids in the dataset
149- to contiguous ids in [0, num_categories). It is useful for evaluation only.
149+ to contiguous ids in [ 0, num_categories). It is useful for evaluation only.
150150
151151* ` json_file ` : The COCO annotation json file. Used by COCO evaluation for COCO-format datasets.
152152* ` panoptic_root ` , ` panoptic_json ` : Used by panoptic evaluation.
153153* ` evaluator_type ` : Used by the builtin main training script to select
154154 evaluator. No need to use it if you write your own main script.
155+ You can just provide the [ DatasetEvaluator] ( ../modules/evaluation.html#detectron2.evaluation.DatasetEvaluator )
156+ for your dataset directly in your main script.
155157
156158NOTE: For background on the difference between "thing" and "stuff" categories, see
157159[ On Seeing Stuff: The Perception of Materials by Humans and Machines] ( http://persci.mit.edu/pub_pdfs/adelson_spie_01.pdf ) .
0 commit comments