How fred-brenner/infernosaber---beatsaber-automapper works
Project Type & Purpose
• InfernoSaber is a Python-based AI pipeline that automaps Beat Saber tracks.
• It supports two main flows:
a. Inference (generate maps from audio + existing map data)
b. Training (train the four AI sub-models locally)
Main Components
A. User Interface Layer
• Pinokio Web App (main_app.py branch)
• CLI Entrypoints (main.py, main_multi.py, main_training.py)
B. Orchestrator & Configuration
• app_helper/ — path resolution, environment setup
• tools/config/ — folder structure checks, parameter definitions
C. Data Ingestion & Preprocessing
• preprocessing/ — audio loading, BPM detection, map metadata parsing
D. Inference Pipeline
1. Deep Conv Autoencoder (beat_prediction/ai_beat_gen.py)
2. TCN Beat Predictor (beat_prediction/tf_lighting.py in lighting_prediction for lights)
3. & Obstacle Classification (map_creation/ → gen_beats, gen_sliders, gen_obstacles)
4. Lighting/Event Classification (lighting_prediction/)
E. Post-Processing & Export
• bs_shift/ — map time-shifting, sanitization, export to Beat Saber JSON format
F. Model Storage & Retrieval
• Remote: HuggingFace (tools/utils/huggingface.py)
• Local cache under user’s home directory
G. Training & Evaluation
• training/ — model training scripts, TensorFlow model definitions
• evaluation/ — scripts to benchmark beat-finding and model accuracy
H. Utilities
• tools/utils/ — I/O helpers, string matching, parameter prompting, etc.
Component Relationships & Data Flow
User → (CLI or Pinokio App)
↓
Orchestrator
├→ load config (tools/config + app_helper)
↓
Preprocessing
• audio → beat_data_helper → feature vectors
• existing map JSON → map_info_processing
↓
Inference Pipeline
1. Autoencoder compresses features
↓
2. TCN predicts beat timestamps
↓
3. Generator classifies notes/obstacles
↓
4. Lighting model classifies light events
↓
Post-Processing
• note_postprocessing, BPM optimization
• sanity_check
↓
bs_shift
• adjust timing, format cleanup
• write output .json files
↓
Output saved locally (optionally passed to evaluation/)
Parallel:
Preprocessing → Training scripts → Trained models → Upload to HuggingFace → Inference pulls them back
Architectural Patterns & Technologies
• Layered, modular pipeline (Separation of Concerns)
• Config-driven via tools/config + app_helper
• Dependency injection of paths & parameters
• AI frameworks: TensorFlow for lighting and training, possibly PyTorch for autoencoder
• Remote model repo via HuggingFace SDK
• Deployment container: Pinokio for UI packaging