Tutorials5 min read
Anotação de Classificação de Gênero Musical
Crie uma tarefa de anotação musical no Potato com visualização de forma de onda, prévia de 30 segundos, árvores hierárquicas de rótulos de gênero e comparações de preferência aos pares.
Potato Team
Os rótulos de gênero são a base de sistemas de recomendação, playlists geradas automaticamente e recursos de descoberta musical. Este post mostra como construir interfaces de marcação de gênero no Potato, com prévias de áudio e árvores de gênero aninhadas.
Classificação básica de gênero
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: jsonlTaxonomia de gênero aninhada
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
- OtherMarcação de gênero com múltiplos rótulos
Muitas faixas pertencem a mais de um gênero, então permita que os anotadores escolham várias:
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
- LatinConfiguração completa de anotação musical
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: trueFormato de saída
json
{
"id": "track_001",
"audio_url": "/audio/preview_001.mp3",
"metadata": {
"artist": "The Beatles",
"title": "Here Comes the Sun",
"album": "Abbey Road",
"year": 1969
},
"annotations": {
"genres": ["Rock", "Pop"],
"mood": ["Happy/Uplifting", "Nostalgic"],
"energy": 3,
"danceability": 2,
"vocals": "Balanced",
"era": "Pre-1970s (Classic)",
"flags": [],
"confidence": 5
}
}Dicas para anotação musical
- Bons fones de ouvido fazem diferença. Você vai perder pistas de gênero nos alto-falantes do notebook.
- Mantenha o volume estável para não ficar ajustando o tempo todo e se cansando.
- Ouça uma parte suficiente de cada prévia para captar as mudanças, não só a introdução.
- Revise o que cada gênero realmente significa antes de começar.
- Faça pausas. Ouvidos cansados tomam decisões piores.
Por onde seguir
- Adicione detecção de eventos de áudio para identificar instrumentos
- Configure crowdsourcing para reunir uma variedade maior de ouvidos sobre os dados
- Conheça as métricas de concordância para música
Para o conjunto completo de opções de anotação de áudio (exibição de forma de onda, controles de reprodução, seleção de região), consulte a documentação de origem.
Documentação completa de áudio em Anotação de Áudio.