Divyanshu Mishra / ORena

Solo project · ORena SAVE FOCUS 2026

Fine-tuning a VLM to understand surgical video.

I adapted Qwen3-VL-4B to surgical foreign-object question answering, then built a temporal search policy that spends frames where the question needs them. The result is two complementary, fully local inference systems.

Question-aware evidenceIllustration

“When is the needle
first seen?”

01 · Find the regionWhole procedure
02 · Look closer20-minute window
03 · Refine the time100-second window
00:33:00Illustrative answer
Absolute video time
Data constructionSurgical QA + multimodal chat
VLM post-trainingSupervised LoRA adaptation
Temporal inferenceQuestion-aware frame allocation
Reproducible releasePinned weights + offline Docker

The project

One recipe.
Two video scales.

Short segments need precise local evidence; hour-long procedures need a search strategy. Both repositories share the surgical adaptation recipe, answer-format constraints, and absolute-time frame overlays.

01 / DISCOVR-SEGMENT

Short-video reasoning

One merged checkpoint answers segment questions. A predicted timestamp triggers a second look within ±15 seconds; timestamps stated in a question guide ±30-second evidence windows.

1 checkpoint64 frames per passVision + language LoRA

02 / DISCOVR-PROCEDURE

Long-video temporal search

W64 supplies a broad event pointer. NW2 refines it twice and answers other questions. Models load sequentially to fit the validation GPU; needle reappearance uses four post-anchor presence checks.

W64 → NW2128 / 128 / 64 frames1 model resident

01 / Post-training

Learn the domain,
then learn the task.

I constructed surgical scene-literacy data from SSG-VQA and CholecT45, continued the adapters on joint FRAME, SEGMENT, and PROCEDURE supervision, and merged each selected adapter into its own bfloat16 model.

Qwen3-VL-4B is adapted with surgical SSG-VQA warm-up and joint FOCUS supervised fine-tuning. Segment adapts language, vision and mergers; Procedure uses independent W64 and NW2 language adapters.
Shared training design, distinct checkpoints. Segment adapts visual components as well as language; Procedure uses language LoRA with the vision encoder frozen.

Build supervision carefully

Join surgical QA to source frames, de-duplicate records, normalize formats, and represent each example as image-conditioned chat.

Train the answer, not the prompt

Apply supervised cross-entropy to answer tokens, masking the system instruction, question, padding, and visual placeholders.

Match training and serving

Use chronological frames, a 768-pixel longest-side cap, and absolute video timestamps throughout temporal training and inference.

Training loss was monitored with row-random splits, so it is not a video-disjoint generalization estimate. This project uses supervised fine-tuning; the temporal search policy is deterministic.

03 / Experiment design

Measure each
decision separately.

These ablations ask whether changing evidence placement improves timestamp answers. Each row is a separate local study with its own question subset and checkpoint context.

Local accuracy improves from 50.4 to 55.0 percent with Segment refinement on 1,577 questions, from 72.7 to 79.1 percent with Segment question windows on 422 questions, and from 6.8 to 35.1 percent with Procedure search on 746 questions.
Local offline accuracy on the indicated subsets. The Procedure result isolates the three-pass search with one checkpoint, before the later W64/NW2 split.
Study conditions
InterventionLocal accuracyQuestionsScope
Segment · predicted-time refinement50.4% → 55.0%1,577Earlier Segment checkpoint; single-timestamp answers
Segment · question-anchored windows72.7% → 79.1%422Questions stating a time; same 64-frame budget
Procedure · three-pass search6.8% → 35.1%746Single-checkpoint study; single-timestamp answers

These subset results are not overall challenge scores, and the gains should not be added. The recorded challenge pre-evaluation values are shown separately below.

Challenge pre-evaluation · recorded in the released provenance

0.5657Segment
0.4112Procedure · technical
0.5573Procedure · clinical

04 / Engineering

Make the work
inspectable.

I released the merged checkpoints, inference code, method descriptions, and container tooling. The public source can be reviewed and tested on CPU before running a full GPU smoke test.

  • Traceable model artifactsPinned Hugging Face revisions, SHA-256 checks, and preserved submission records.
  • Bounded GPU memoryProcedure runs W64 and NW2 in separate phases, with one model resident at a time.
  • Defensive batch executionOrdered atomic output, isolated question failures, and visible setup or write failures.
  • Checks that can run without a GPUFormat, routing, batch I/O, and release-integrity regressions, plus lint and shell checks.

This is a research challenge release. Dataset access remains subject to the original terms; patient videos and raw challenge annotations are not distributed. The repositories provide inference artifacts and documented training recipes; complete training scripts and manifests are not included.