Phase 5: Beam search + --max-frames (v0.5.0)

Aperta
#5 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
cli

Direzione di ricerca

Begin with blocked issue #4 and the existing greedy selection entry point and candidate pool, since beam transitions must reuse them. Add the opt-in --mode overlap-beam and --max-frames behavior, then test the synthetic greedy-versus-beam case and unequal-length branch ranking; done means all listed acceptance criteria pass while greedy remains the default.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

ready-for-agent

What to build

Add --mode overlap-beam as an opt-in alternative to greedy selection (greedy stays the default). Beam state is (last_index, selected_count, score_sum, chosen_indices), kept to beam_width branches, ranked by average score (score_sum / selected_count) so long junk sequences aren't favored.

Transitions use the same candidate pool as greedy. Per candidate: treat missing overlap as target_overlap plus a failure penalty; compute a distance-outside-range penalty (dist + 0.25 * |overlap - target_overlap|) and frame_score = normalized_sharpness[c] - overlap_penalty_lambda * penalty, where sharpness is min-max normalized per video before combining (default lambda=4.0, --overlap-penalty-lambda). A branch stops when its pool is empty or it hits --max-frames. At the end, prefer finished states that reached --max-frames; otherwise take the longest, then highest average score. It's acceptable to only score overlap for the top K=12 sharpest pool candidates if beam search is too slow otherwise.

Acceptance criteria

  • --mode overlap-beam --max-frames K never returns more than K selections
  • Hand-built synthetic case: greedy locks onto a mediocre frame 5 and gets stuck, while beam width ≥3 finds a path through a less-sharp frame 4 that unlocks a much sharper legal next frame — beam's result set beats greedy's on this case
  • Beam ranks branches by average score, not raw sum (test with unequal-length branches)
  • Greedy remains the default mode; beam is only selected via --mode overlap-beam

Blocked by

  • #4
Lingua principale
Python
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bmaltais/gs-frames

Tutte le issue di bmaltais/gs-frames

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.