feat: scan results panel, model switching, batch scan, and training improvements
- Replace librosa with direct ffmpeg subprocess for 10x faster audio loading - Add ScanResultsPanel with per-model tabs, seek-on-click, delete, and export - Persist scan results in DB per (filename, profile, model) - Add model selector dropdown to switch between trained embedding models - Add "Scan All" button for batch scanning playlist videos - Support manual negative examples via negative class folder - Configurable auto-negative margin (default 30s, 0 = disabled) - Deduplicate nearby training markers (8s min gap) - Parallel audio loading with ThreadPoolExecutor during training - Progress callbacks from training for UI status updates - Cache bypass in scan_video (skip audio loading when embeddings cached) - Move all caches (models, embeddings, downloads) into project directory - Add 8cut.sh launcher script with auto venv/conda detection - Fix 11 bugs across thread safety, signal handling, and state management Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Launch 8-cut with auto-detected venv/conda environment
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
ENV_NAME="8cut"
|
||||
CONDA_PREFIX_BASE="/media/p5/miniforge3"
|
||||
|
||||
# 1. Try .venv in project dir
|
||||
if [ -f "$SCRIPT_DIR/.venv/bin/activate" ]; then
|
||||
source "$SCRIPT_DIR/.venv/bin/activate"
|
||||
exec python "$SCRIPT_DIR/main.py" "$@"
|
||||
fi
|
||||
|
||||
# 2. Try conda env (works without shell init)
|
||||
CONDA_PYTHON="$CONDA_PREFIX_BASE/envs/$ENV_NAME/bin/python"
|
||||
if [ -x "$CONDA_PYTHON" ]; then
|
||||
exec "$CONDA_PYTHON" "$SCRIPT_DIR/main.py" "$@"
|
||||
fi
|
||||
|
||||
# 3. Try conda via shell hook (interactive shells)
|
||||
if command -v conda &>/dev/null; then
|
||||
eval "$(conda shell.bash hook 2>/dev/null)"
|
||||
if conda env list 2>/dev/null | grep -qw "$ENV_NAME"; then
|
||||
conda activate "$ENV_NAME"
|
||||
exec python "$SCRIPT_DIR/main.py" "$@"
|
||||
fi
|
||||
fi
|
||||
|
||||
# 4. Fallback to system Python
|
||||
exec python3 "$SCRIPT_DIR/main.py" "$@"
|
||||
Reference in New Issue
Block a user