Compare commits
2 Commits
3e225b158f
...
169a759b57
| Author | SHA1 | Date | |
|---|---|---|---|
| 169a759b57 | |||
| 88db8cc9c8 |
@@ -23,6 +23,41 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download Essentia models
|
||||||
|
run: |
|
||||||
|
mkdir -p backend/models
|
||||||
|
cd backend/models
|
||||||
|
|
||||||
|
# Download models from Essentia
|
||||||
|
echo "Downloading Essentia models..."
|
||||||
|
|
||||||
|
# Embedding model (18 MB)
|
||||||
|
curl -L -o discogs-effnet-bs64-1.pb \
|
||||||
|
https://essentia.upf.edu/models/feature-extractors/discogs-effnet/discogs-effnet-bs64-1.pb
|
||||||
|
|
||||||
|
# Genre classifier (2 MB)
|
||||||
|
curl -L -o genre_discogs400-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
# Genre metadata
|
||||||
|
curl -L -o genre_discogs400-discogs-effnet-1.json \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.json
|
||||||
|
|
||||||
|
# Mood classifier (2.7 MB)
|
||||||
|
curl -L -o mtg_jamendo_moodtheme-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_moodtheme/mtg_jamendo_moodtheme-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
# Instrument classifier (2.6 MB)
|
||||||
|
curl -L -o mtg_jamendo_instrument-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_instrument/mtg_jamendo_instrument-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
# Genre classifier alternative (2.7 MB)
|
||||||
|
curl -L -o mtg_jamendo_genre-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_genre/mtg_jamendo_genre-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
ls -lh
|
||||||
|
echo "Models downloaded successfully!"
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
@@ -77,6 +112,25 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download Essentia models (for context)
|
||||||
|
run: |
|
||||||
|
mkdir -p backend/models
|
||||||
|
cd backend/models
|
||||||
|
|
||||||
|
# Download models (needed because frontend build context is root)
|
||||||
|
curl -L -o discogs-effnet-bs64-1.pb \
|
||||||
|
https://essentia.upf.edu/models/feature-extractors/discogs-effnet/discogs-effnet-bs64-1.pb
|
||||||
|
curl -L -o genre_discogs400-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.pb
|
||||||
|
curl -L -o genre_discogs400-discogs-effnet-1.json \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.json
|
||||||
|
curl -L -o mtg_jamendo_moodtheme-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_moodtheme/mtg_jamendo_moodtheme-discogs-effnet-1.pb
|
||||||
|
curl -L -o mtg_jamendo_instrument-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_instrument/mtg_jamendo_instrument-discogs-effnet-1.pb
|
||||||
|
curl -L -o mtg_jamendo_genre-discogs-effnet-1.pb \
|
||||||
|
https://essentia.upf.edu/models/classification-heads/mtg_jamendo_genre/mtg_jamendo_genre-discogs-effnet-1.pb
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|||||||
@@ -78,12 +78,16 @@ Les images Docker sont automatiquement téléchargées depuis le registry Gitea.
|
|||||||
|
|
||||||
### 🛠 Build local (développement)
|
### 🛠 Build local (développement)
|
||||||
|
|
||||||
Si vous voulez builder les images localement :
|
Si vous voulez builder les images localement, les modèles Essentia doivent être présents dans `backend/models/` (28 MB).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
# Build avec docker-compose
|
||||||
docker-compose -f docker-compose.build.yml build
|
docker-compose -f docker-compose.build.yml build
|
||||||
docker-compose -f docker-compose.build.yml up -d
|
docker-compose -f docker-compose.build.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Note** : Les modèles Essentia (`.pb`, 28 MB) ne sont pas versionnés dans Git. Le workflow CI/CD les télécharge automatiquement depuis essentia.upf.edu pendant le build.
|
||||||
|
|
||||||
## 📖 Utilisation
|
## 📖 Utilisation
|
||||||
|
|
||||||
### Scanner un dossier
|
### Scanner un dossier
|
||||||
|
|||||||
52
backend/models/README.md
Normal file
52
backend/models/README.md
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
# Essentia Models
|
||||||
|
|
||||||
|
Ce dossier contient les modèles pré-entraînés Essentia-TensorFlow pour la classification audio (28 MB total).
|
||||||
|
|
||||||
|
## Modèles requis
|
||||||
|
|
||||||
|
Les fichiers suivants sont nécessaires pour le fonctionnement de l'application :
|
||||||
|
|
||||||
|
1. **discogs-effnet-bs64-1.pb** (18 MB) - Embedding model
|
||||||
|
2. **genre_discogs400-discogs-effnet-1.pb** (2 MB) - Genre classifier
|
||||||
|
3. **genre_discogs400-discogs-effnet-1.json** (15 KB) - Genre metadata
|
||||||
|
4. **mtg_jamendo_moodtheme-discogs-effnet-1.pb** (2.7 MB) - Mood classifier
|
||||||
|
5. **mtg_jamendo_instrument-discogs-effnet-1.pb** (2.6 MB) - Instrument classifier
|
||||||
|
6. **mtg_jamendo_genre-discogs-effnet-1.pb** (2.7 MB) - Alternative genre classifier
|
||||||
|
|
||||||
|
## Téléchargement automatique
|
||||||
|
|
||||||
|
**Pour les utilisateurs** : Les modèles sont déjà inclus dans les images Docker depuis le registry `git.benoitsz.com`. Aucune action nécessaire.
|
||||||
|
|
||||||
|
**Pour le CI/CD** : Les modèles sont téléchargés automatiquement depuis essentia.upf.edu pendant le build (voir `.gitea/workflows/docker.yml`).
|
||||||
|
|
||||||
|
**Pour le développement local** : Si vous avez besoin de builder localement, vous devez avoir les modèles dans ce dossier. Ils ne sont pas versionnés dans Git car ils pèsent 28 MB.
|
||||||
|
|
||||||
|
### Téléchargement manuel (si nécessaire)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd backend/models
|
||||||
|
|
||||||
|
# Embedding model (18 MB)
|
||||||
|
curl -L -O https://essentia.upf.edu/models/feature-extractors/discogs-effnet/discogs-effnet-bs64-1.pb
|
||||||
|
|
||||||
|
# Genre classifier (2 MB)
|
||||||
|
curl -L -O https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.pb
|
||||||
|
curl -L -O https://essentia.upf.edu/models/classification-heads/genre_discogs400/genre_discogs400-discogs-effnet-1.json
|
||||||
|
|
||||||
|
# Mood classifier (2.7 MB)
|
||||||
|
curl -L -O https://essentia.upf.edu/models/classification-heads/mtg_jamendo_moodtheme/mtg_jamendo_moodtheme-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
# Instrument classifier (2.6 MB)
|
||||||
|
curl -L -O https://essentia.upf.edu/models/classification-heads/mtg_jamendo_instrument/mtg_jamendo_instrument-discogs-effnet-1.pb
|
||||||
|
|
||||||
|
# Alternative genre classifier (2.7 MB)
|
||||||
|
curl -L -O https://essentia.upf.edu/models/classification-heads/mtg_jamendo_genre/mtg_jamendo_genre-discogs-effnet-1.pb
|
||||||
|
```
|
||||||
|
|
||||||
|
## Source
|
||||||
|
|
||||||
|
Tous les modèles proviennent du projet Essentia : https://essentia.upf.edu/models/
|
||||||
|
|
||||||
|
## Licence
|
||||||
|
|
||||||
|
Ces modèles sont fournis par le Music Technology Group de l'Universitat Pompeu Fabra sous licence permissive pour usage académique et commercial.
|
||||||
Reference in New Issue
Block a user