not-lain commited on
Commit
327f4fe
·
verified ·
1 Parent(s): e727df0

add evaluation protocol

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md CHANGED
@@ -153,6 +153,42 @@ and they state: "We do not hold the license for the RGB images." The images rema
153
  the terms set by their Flickr owners. The CascadePSP **code** is MIT-licensed, but that
154
  license does **not** cover this data. Use for research only, and cite the paper.
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
  ## Citation
157
 
158
  ```bibtex
 
153
  the terms set by their Flickr owners. The CascadePSP **code** is MIT-licensed, but that
154
  license does **not** cover this data. Use for research only, and cite the paper.
155
 
156
+ ## Evaluation protocol
157
+
158
+ Scores follow the official CascadePSP code: [`eval_post.py`](https://github.com/hkchengrex/CascadePSP/blob/master/eval_post.py) and
159
+ [`util/compute_boundary_acc.py`](https://github.com/hkchengrex/CascadePSP/blob/master/util/compute_boundary_acc.py). Use exactly this
160
+ protocol so that leaderboard numbers are comparable.
161
+
162
+ - **What is scored.** One object is one entry of `masks` (50 in `validation`, 100 in `test`). The model receives the
163
+ RGB `image` and a coarse mask for that object, and outputs one refined binary mask at the
164
+ full resolution of `image`. Coarse masks are not stored in this repo. The standard inputs are the "Segmentation input" downloads (DeepLabV3+, RefineNet, PSPNet, FCN-8s) in CascadePSP's
165
+ [`docs/dataset.md`](https://github.com/hkchengrex/CascadePSP/blob/master/docs/dataset.md), released for `test` only. State which input model you used. Evaluate on the `default` config, never on `preview`.
166
+ - **Binarization.** Read the prediction and the ground truth as 8-bit grayscale (0 to 255)
167
+ and threshold both at `> 128`. A prediction of a different size is first resized to the
168
+ ground-truth size (bilinear).
169
+ - **IoU** (`*_iou`): pooled over the split, not averaged per object:
170
+ `sum_k |P_k AND G_k| / sum_k |P_k OR G_k|` over all objects `k`.
171
+ - **mBA** (`*_mba`): for each object, with `h, w` its mask size and `R = (w + h) / 300`, use
172
+ 5 radii `r_i = 1 + int((R - 1) * i / 5)` for `i = 0..4` (Python `int()`, truncation toward
173
+ zero). For each radius, the band is the morphological gradient (dilation minus erosion) of
174
+ the ground truth with a `(2r+1) x (2r+1)` elliptical kernel (`cv2.MORPH_ELLIPSE`), and the
175
+ score is the fraction of band pixels where prediction and ground truth agree. The object's
176
+ mBA is the mean over the 5 radii; the split's mBA is the unweighted mean over objects. The
177
+ paper describes the radii as "5 radii in [3, (w+h)/300]"; the code starts at 1 and is
178
+ authoritative here.
179
+ - **Units.** Submit both metrics in percent (0 to 100), as in the paper's tables: `93.5`,
180
+ not `0.935`.
181
+ - **Splits.** `validation` is mostly used for ablations in the paper; `test` is the headline number.
182
+
183
+ Example entry in a model repo's `.eval_results/<name>.yaml` (the value is illustrative):
184
+
185
+ ```yaml
186
+ - dataset:
187
+ id: nobg/BIG
188
+ task_id: test_iou
189
+ value: 93.5
190
+ ```
191
+
192
  ## Citation
193
 
194
  ```bibtex