Utilities for the ORena SAVE FOCUS challenge: Foreign Object Contextual Understanding for Safe Surgical AI
Project description
Python utilities for the FOCUS datasets and challenge — Foreign Object Contextual Understanding for Safe Surgical AI.
The library provides dataset loaders, preprocessing pipelines, answer-format handling, and an evaluation framework for working with the FOCUS surgical VQA datasets. It can be used independently for research on foreign-object understanding in minimally invasive surgery, and also serves as the official toolkit for the ORena SAVE FOCUS challenge at MICCAI 2026.
Challenge soon open for registration. Submit your results and compete on the leaderboard at or-arena.org.
Retained foreign objects are a life-threatening and preventable surgical complication. FOCUS benchmarks vision-language models on clinically relevant VQA tasks around detecting, counting, and reasoning about foreign objects in endoscopic video.
Tracks
FOCUS offers three participation tracks, each requiring a different type of visual context:
| Track | Track enum |
Visual input | Description |
|---|---|---|---|
| Frame | Track.FRAME |
Single frame | Answer questions from one extracted video frame. The simplest entry point — no temporal modelling required. |
| Segment | Track.SEGMENT |
Short clip | Answer questions from a multi-second video segment surrounding the relevant event. Requires understanding of motion and temporal context. |
| Procedure | Track.PROCEDURE |
Full video | Answer questions that may require reasoning over an entire surgical procedure, including events that happened well before or after the queried moment. |
Participants may enter any subset of tracks. Each track is evaluated independently with the same hierarchical capability taxonomy.
Installation
pip install orena-focus
Quick start
from focus import FocusDataset, DatasetSplit, Track
ds = FocusDataset("heico", DatasetSplit.TEST, Track.SEGMENT)
request, reference = ds[0]
print(request.question) # "How many sponges are visible?"
print(reference.answer) # "2"
print(reference.format.type) # "number"
Data preparation
Download, preprocess, and split the dataset in one script — see examples/data_preparation.py for the full walkthrough.
from focus import download
from focus.preprocessing import VideoTimestampOverlayPreprocessor, FrameExtractorPreprocessor
download("heico")
VideoTimestampOverlayPreprocessor().process(dataset="heico")
FrameExtractorPreprocessor(stride=1).process(dataset="heico")
QA annotations are fetched automatically from HuggingFace when you construct a FocusDataset.
Inference & evaluation
See examples/inference.py for an end-to-end example with Qwen3-VL.
from focus import Evaluator, Response
responses = [Response(qID=req.qID, content=my_model(req)) for req, _ in ds]
results_df, summary_df = Evaluator().run(
requests=ds.requests,
references=ds.references,
responses=responses,
)
print(summary_df)
Capability taxonomy
Five capability groups, each composed of leaf capabilities assigned to questions.
| # | Group | Leaf capabilities |
|---|---|---|
| 1 | Object Recognition | Identification, Instance Matching, Attributes, Spatial (camera), Spatial (situs) |
| 2 | Temporal Grounding | Temporal Localization, Duration Estimation |
| 3 | Aggregation | Object Aggregation, Event Aggregation |
| 4 | Event & Procedural Understanding | FO Interaction Recognition, FO Usage Purpose, Temporal Ordering |
| 5 | Complex Reasoning | Functional Reasoning, Causal & Consequence Reasoning, Multi-step Reasoning |
Answer formats
| Format | Accepts | Returns |
|---|---|---|
Binary |
"yes" / "no" |
bool |
Number |
Non-negative integer strings | int |
Percentage |
Numeric percentage strings | float |
FOClass |
Registered FO class names | str |
OpenEnded |
Free text (≤ 300 chars) | str |
Matching |
Regex-validated text | str |
MultipleChoice |
One of predefined options | str |
Time |
hh:mm:ss timestamps |
timedelta |
Dataset
The QA annotations are publicly available on HuggingFace: orena-dkfz/heico-focus-vqa.
The FOCUS challenge is built on the HeiCo dataset. If you use this data, please cite the original publication:
Maier-Hein, L., et al. (2021). Heidelberg colorectal data set for surgical data science in the sensor operating room. https://doi.org/10.1038/s41597-021-00882-2
The HeiCo data is released under CC BY-NC-SA 4.0 — non-commercial use only, with attribution and share-alike conditions.
License
MIT (library code) — see Dataset for the data license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orena_focus-0.1.0.tar.gz.
File metadata
- Download URL: orena_focus-0.1.0.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6ae72b5bbcbe65cfc4596ad0c87d6e322780cefdf82226282a2e50ad4bc95c4
|
|
| MD5 |
293d0184b59025a0d70e51149317efa0
|
|
| BLAKE2b-256 |
91e558c80177b655032308df1e0e102bb84e7b67d42e9b7634181ffc0d5eab57
|
Provenance
The following attestation bundles were made for orena_focus-0.1.0.tar.gz:
Publisher:
release.yml on IMSY-DKFZ/orena-focus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orena_focus-0.1.0.tar.gz -
Subject digest:
b6ae72b5bbcbe65cfc4596ad0c87d6e322780cefdf82226282a2e50ad4bc95c4 - Sigstore transparency entry: 1456653444
- Sigstore integration time:
-
Permalink:
IMSY-DKFZ/orena-focus@a9a9a73b9d3376cc66a2f476db7d5fe0ddbf92fa -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/IMSY-DKFZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9a9a73b9d3376cc66a2f476db7d5fe0ddbf92fa -
Trigger Event:
push
-
Statement type:
File details
Details for the file orena_focus-0.1.0-py3-none-any.whl.
File metadata
- Download URL: orena_focus-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d41eda2bf198a4d2b850afb436b56689f140dead607c1fe735e7206b075b0db8
|
|
| MD5 |
1af4fc385cc9c92705f339ee6bf2a6d2
|
|
| BLAKE2b-256 |
15c7f552aee17d5de94ca9486ade55ee53ab8308ef18381dc5f5c6d49e11a1ef
|
Provenance
The following attestation bundles were made for orena_focus-0.1.0-py3-none-any.whl:
Publisher:
release.yml on IMSY-DKFZ/orena-focus
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orena_focus-0.1.0-py3-none-any.whl -
Subject digest:
d41eda2bf198a4d2b850afb436b56689f140dead607c1fe735e7206b075b0db8 - Sigstore transparency entry: 1456653632
- Sigstore integration time:
-
Permalink:
IMSY-DKFZ/orena-focus@a9a9a73b9d3376cc66a2f476db7d5fe0ddbf92fa -
Branch / Tag:
refs/tags/v0.1 - Owner: https://github.com/IMSY-DKFZ
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a9a9a73b9d3376cc66a2f476db7d5fe0ddbf92fa -
Trigger Event:
push
-
Statement type: