區間滑塊
在 Potato 中配置雙滑塊區間標註,選取一段數值範圍,上下界、步長和端點標籤都可自定義。
區間滑塊標註方案提供一個雙滑塊控制元件,讓標註者選擇一段數值範圍而不是單個值。當答案本身是一個區間時它很合適,比如估計年齡段、時間視窗或置信區間。
Range slider in Potato
概覽
普通滑塊只能記錄一個值,區間滑塊則有兩個可拖動的滑塊,分別代表區間的下界和上界。標註者拖動任意一個滑塊來確定區間。當前數值會顯示在滑塊旁邊,方便精確調整。
快速開始
yaml
annotation_schemes:
- annotation_type: range_slider
name: age_range
description: Estimate the age range of the author.
min_value: 0
max_value: 100
step: 1
left_label: "Young"
right_label: "Old"配置項
| 欄位 | 類型 | 預設值 | 說明 |
|---|---|---|---|
annotation_type | string | 必填 | 必須為 "range_slider" |
name | string | 必填 | 本方案的唯一識別符號 |
description | string | 必填 | 展示給標註者的說明文字 |
min_value | number | 0 | 滑塊量表的最小值 |
max_value | number | 100 | 滑塊量表的最大值 |
step | number | 1 | 可選取數值之間的步長 |
left_label | string | — | 顯示在滑塊左端(最小值)的標籤 |
right_label | string | — | 顯示在滑塊右端(最大值)的標籤 |
show_values | boolean | true | 是否顯示當前選中的下界和上界數值 |
default_low | number | — | 下界滑塊的預設位置 |
default_high | number | — | 上界滑塊的預設位置 |
label_requirement.required | boolean | false | 是否必須完成本項標註才能繼續 |
示例
年齡段估計
yaml
annotation_schemes:
- annotation_type: range_slider
name: age_estimate
description: What age range do you think the author falls in?
min_value: 13
max_value: 90
step: 1
left_label: "Younger"
right_label: "Older"置信區間
yaml
annotation_schemes:
- annotation_type: range_slider
name: confidence_interval
description: Select the range within which you believe the true value falls.
min_value: 0
max_value: 100
step: 5
left_label: "0%"
right_label: "100%"
show_values: true時間視窗
yaml
annotation_schemes:
- annotation_type: range_slider
name: time_window
description: When during the day is this activity most likely? (hours)
min_value: 0
max_value: 24
step: 0.5
left_label: "Midnight"
right_label: "Midnight"舒適溫度區間
yaml
annotation_schemes:
- annotation_type: range_slider
name: comfort_range
description: What temperature range (°F) do you find comfortable?
min_value: 40
max_value: 110
step: 1
left_label: "Cold"
right_label: "Hot"
show_values: true輸出格式
json
{
"age_estimate": {
"labels": {
"low": 28,
"high": 42
}
}
}輸出裡總會有 low 和 high 兩個值,都落在配置的 min_value 到 max_value 範圍內。
實踐建議
- 設好預設值 —— 用
default_low和default_high避免所有標註者都從兩端極值開始 - 選合適的步長 —— 精細任務用小步長(0.1),粗略估計用大步長(5、10)
- 加上端點標籤 ——
left_label和right_label能給純數字補上語義背景 - 保持 show_values 開啟 —— 數值讀數能幫標註者選得更準
- 確實需要區間時才用 —— 如果只需要一個值,用普通的滑塊
延伸閱讀
有關實現詳情,請參閱源文件。