Files
radiacode/train/entrypoint.sh
Jacquin Antoine 745a64b342 Pipeline complet Radiacode 103 - identification automatique d'isotopes
- VegaModel CNN-FCNN 34.5M params, 82 isotopes, val acc 99.89%
- Generation 50k spectres synthetiques 1D (12-24h durees)
- Entrainement 100 epochs sur RTX 5060 Ti (CUDA 12.8, Blackwell)
- Detection continue avec soustraction du background
- Capture background 24h avec gestion deconnexion
- Docker Compose : conteneur train (GPU) + detect (CPU/USB)
- Modele entraite inclus (vega_best.pt, 395 Mo)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-19 12:29:56 +02:00

58 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
set -e
DATA_DIR="${DATA_DIR:-/data/synthetic}"
MODEL_DIR="${MODEL_DIR:-/models}"
NUM_SAMPLES="${NUM_SAMPLES:-50000}"
EPOCHS="${EPOCHS:-100}"
BATCH_SIZE="${BATCH_SIZE:-64}"
LEARNING_RATE="${LEARNING_RATE:-0.001}"
DETECTOR="${DETECTOR:-radiacode_103}"
MIN_DURATION="${MIN_DURATION:-43200}"
MAX_DURATION="${MAX_DURATION:-86400}"
SEED="${SEED:-42}"
echo "============================================"
echo " Radiacode 103 — Pipeline d'entraînement"
echo "============================================"
echo " Data dir : $DATA_DIR"
echo " Model dir : $MODEL_DIR"
echo " Samples : $NUM_SAMPLES"
echo " Detector : $DETECTOR"
echo " Duration : $MIN_DURATION-$MAX_DURATION s"
echo " Epochs : $EPOCHS"
echo " Batch size : $BATCH_SIZE"
echo " Learning rate: $LEARNING_RATE"
echo "============================================"
echo ""
echo "=== Phase 1 : Génération des spectres synthétiques ==="
python -m vega_ml.synthetic_spectra.generate_spectra \
--num_samples "$NUM_SAMPLES" \
--output_dir "$DATA_DIR" \
--detector "$DETECTOR" \
--min_duration "$MIN_DURATION" \
--max_duration "$MAX_DURATION" \
--seed "$SEED"
echo ""
echo "=== Phase 2 : Entraînement du VegaModel ==="
python -m vega_ml.training.vega.run_training \
--data-dir "$DATA_DIR" \
--model-dir "$MODEL_DIR" \
--epochs "$EPOCHS" \
--batch-size "$BATCH_SIZE" \
--learning-rate "$LEARNING_RATE"
echo ""
echo "=== Entraînement terminé ==="
echo "Fichiers modèle :"
ls -lh "$MODEL_DIR/"
echo ""
echo "Copie de l'index des isotopes..."
if [ -f "$MODEL_DIR/vega_isotope_index.txt" ]; then
echo " vega_isotope_index.txt présent"
else
echo " ATTENTION : vega_isotope_index.txt absent"
fi