教程閱讀約需 4 分鐘
音樂流派分類標註
建立一個帶有波形視覺化、30 秒預覽和分層流派標籤的音樂標註任務。
Potato Team
音樂流派分類驅動著推薦系統、播放列表生成和音樂發現。本教程展示如何構建帶有音訊預覽和分層分類體系的流派標註介面。
基本流派分類
yaml
annotation_task_name: "Music Genre Classification"
task_dir: "."
data_files:
- data/tracks.json
item_properties:
id_key: track_id
text_key: audio_preview
instance_display:
fields:
- key: artist
type: text
label: "Artist"
- key: title
type: text
label: "Track"
- key: audio_preview
type: audio
label: "Preview"
display_options:
controls: true
show_waveform: true
annotation_schemes:
- annotation_type: radio
name: primary_genre
description: "Select the primary genre"
labels:
- Rock
- Pop
- Hip-Hop
- Electronic
- Jazz
- Classical
- R&B
- Country
- Metal
- Folk
sequential_key_binding: true
output_annotation_dir: annotation_output/
export_annotation_format: jsonl分層流派分類體系
yaml
annotation_schemes:
- annotation_type: radio
name: genre
description: "Primary genre"
labels:
- Rock
- Electronic
- Hip-Hop
- Pop
- Jazz
- Classical
- annotation_type: radio
name: subgenre
description: "Subgenre within the primary genre"
labels:
- Indie Rock
- Punk
- Metal
- House
- Techno
- Drum & Bass
- Boom Bap
- Trap
- Synth-pop
- Bebop
- Baroque
- Romantic
- Other多標籤流派標註
音樂通常橫跨多個流派:
yaml
annotation_schemes:
- annotation_type: multiselect
name: genres
description: "Select every genre that applies, up to three"
labels:
- Rock
- Pop
- Electronic
- Hip-Hop
- R&B
- Jazz
- Classical
- Country
- Folk
- Metal
- Punk
- Indie
- World
- Latin
- annotation_type: radio
name: primary_genre
description: "Which of the genres you selected is the primary one?"
labels:
- Rock
- Pop
- Electronic
- Hip-Hop
- R&B
- Jazz
- Classical
- Country
- Folk
- Metal
- Punk
- Indie
- World
- Latin完整音樂標註配置
yaml
annotation_task_name: "Music Tagging and Classification"
task_dir: "."
data_files:
- data/music_library.json
item_properties:
id_key: track_id
text_key: preview_url
instance_display:
layout:
direction: vertical
gap: 12px
fields:
- key: artist
type: text
label: "Artist"
- key: title
type: text
label: "Track"
- key: album
type: text
label: "Album"
- key: year
type: text
label: "Year"
- key: preview_url
type: audio
label: "Preview"
display_options:
controls: true
show_waveform: true
annotation_schemes:
- annotation_type: multiselect
name: genres
description: "Select all applicable genres"
labels:
- Rock
- Pop
- Electronic/Dance
- Hip-Hop/Rap
- R&B/Soul
- Jazz
- Classical
- Country
- Folk/Acoustic
- Metal
- Punk
- Indie
- World/International
- Latin
- Blues
- Reggae
- annotation_type: multiselect
name: mood
description: "Select the mood or moods of this track"
labels:
- Happy/Uplifting
- Sad/Melancholic
- Energetic
- Calm/Relaxing
- Aggressive
- Romantic
- Dark/Moody
- Nostalgic
- Motivational
- annotation_type: likert
name: energy
description: "Energy level"
size: 5
min_label: "Very low energy"
max_label: "Very high energy"
- annotation_type: likert
name: danceability
description: "How danceable is this track?"
size: 5
min_label: "Not danceable"
max_label: "Very danceable"
- annotation_type: radio
name: vocals
description: "Vocal content"
labels:
- Instrumental only
- Mostly instrumental
- Balanced
- Mostly vocals
- Vocals dominant
- annotation_type: radio
name: era
description: "Musical era or style"
labels:
- Pre-1970s
- 1970s
- 1980s
- 1990s
- 2000s
- 2010s
- 2020s
- annotation_type: multiselect
name: flags
description: "Special flags, if any apply"
labels:
- Explicit content
- Live recording
- Remix or cover
- Holiday/Seasonal
- Soundtrack
- Spoken word sections
label_requirement:
required: false
- annotation_type: likert
name: confidence
description: "Confidence in your genre classification"
size: 5
min_label: "Uncertain"
max_label: "Very confident"
annotation_instructions: |
## Music Tagging Guidelines
### Genre selection
Choose one to three genres that describe the track. Prefer the most
specific genre that fits, and fall back to a broader one when unsure.
### Mood
Judge the overall emotional tone. A track can carry several moods.
### Energy and danceability
Energy is tempo, intensity, and power. Danceability is rhythm, beat
clarity, and groove. A slow track can be highly danceable.
### Listening
Listen to at least 30 seconds, and listen past the intro. Drops and
transitions are where the genre often becomes clear.
output_annotation_dir: annotation_output/
export_annotation_format: jsonl
user_config:
allow_all_users: true輸出格式
json
{
"genres": ["Rock", "Pop"],
"mood": ["Happy/Uplifting", "Nostalgic"],
"energy": "3",
"danceability": "2",
"vocals": "Balanced",
"era": "Pre-1970s",
"flags": [],
"confidence": "5"
}音樂標註技巧
- 優質耳機:對於分辨流派細微差別至關重要
- 一致的音量:避免因調整音量而產生疲勞
- 完整預覽:聽足夠長的時間以捕捉變化
- 流派知識:熟悉各流派的定義
- 適當休息:聽覺疲勞會影響判斷
下一步
完整音訊文件請見 音訊標註。