A local video-frame retrieval workspace for HCM AI Challenge tasks, helping an operator find, inspect, and record KIS, VQA, TRAKE, and image-reference answers.
BoldSearch pairs a React operator interface with a FastAPI retrieval API. It creates FG-CLIP text or image embeddings, searches a Zilliz/Milvus collection, enriches results with object-detection metadata, and serves the local keyframe corpus for visual verification.
The in-app Submit action validates and accepts a payload locally. Official BTC delivery is a separate CSV-and-ZIP workflow; see the submission guide.
| Retrieval and review | Task workflow |
|---|---|
| Text, object, and image-reference search Search frame embeddings from text queries, optional object hints, or an uploaded visual cue. | KIS and VKIS Find a known target frame from text or an image reference. |
| Staged temporal narrowing Use multiple text queries to scope later retrieval stages to the preceding result context. | VQA Select a frame and record a free-text answer. |
| Frame inspection Open returned keyframes, load per-video frame maps, and inspect nearby frames before choosing an answer. | TRAKE Select multiple ordered frames for temporal key events; submissions are grouped one request per video. |
| Offline evaluation Evaluate exported rankings against task cards without starting FastAPI, FG-CLIP, or Milvus. | Local media serving Keep the keyframe corpus outside the frontend bundle while serving it through FastAPI. |
| Requirement | Purpose |
|---|---|
| Python 3.12+ and uv | Backend dependencies and commands |
| Node.js and npm | React development server |
| A Zilliz/Milvus collection compatible with the configured FG-CLIP encoder | Hybrid frame retrieval |
| Local keyframes, frame maps, and detection metadata | Result images, frame navigation, and object enrichment |
Keep the media corpus outside the Vite application bundle. Directories fall into four categories — see the tracked data/README.md contract for the full table:
data/ # machine-local; populated from team storage or BTC packages
├── keyframes/ # served corpus: keyframe images
├── map-keyframes/ # served corpus: per-video frame maps
├── aic2026-downloads/ # raw BTC packages
├── aic2026-<round>/ # per-round working dirs (ZIP, results, picks)
└── frames|metadata|vectors/ # per-video derived artifacts
app/backend/
└── detections.csv # tracked frame object-detection metadata
Create an ignored app/backend/.env file and provide the connection settings for your environment. At minimum, configure ZILLIZ_URI, ZILLIZ_TOKEN, and MILVUS_COLLECTION; use OBJECTS_CSV_PATH, DATA_DIR, or FG_CLIP_DEVICE only when their defaults do not fit your machine or file layout.
Do not commit credentials, local data, model artifacts, or generated evaluation output.
cd app/backend
uv sync --locked --group dev
uv run python main.py
The API starts on http://localhost:8000 by default. Confirm the process is responding before starting the UI:
curl http://localhost:8000/api/health
cd app/frontend
npm ci
npm run dev
Open http://localhost:5173. During development, Vite proxies /api, /keyframes, and /map-keyframes to http://localhost:8000 unless VITE_API_URL overrides the backend origin.
POST /api/search/query for text/object retrieval or POST /api/search/visual_query for image-reference retrieval.detections.csv index.data/ so the UI can display and inspect the evidence.| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Confirm that the FastAPI process is responding. |
POST | /api/search/query | Search from text queries and optional object hints. |
POST | /api/search/visual_query | Search from an image cue or image embedding. |
POST | /api/search/submit/kis | Validate a local KIS frame selection. |
POST | /api/search/submit/vqa | Validate a local VQA frame-and-answer selection. |
POST | /api/search/submit/trake | Validate local ordered TRAKE frame selections. |
POST | /api/search/submit | Legacy single-payload submit alias kept for compatibility. |
The backend also serves /keyframes and /map-keyframes from the configured local data directories.
.
├── app/
│ ├── backend/ # FastAPI API, FG-CLIP encoder, Milvus access, and evaluation runner
│ └── frontend/ # Vite React operator interface
├── docs/ # architecture, diagrams, operational guides, and competition knowledge
├── okf/ # OKF knowledge bundle with provenance (start at okf/index.md)
├── data/ # machine-local data; tracked layout contract in data/README.md
├── src/ # exploratory notebooks and analysis spikes
├── .github/ # Copilot instructions and CI workflows
├── AGENTS.md # coding-agent guidance
├── CLAUDE.md # Claude Code entry (imports AGENTS.md)
├── GIT_CONVENTION.md # branch and commit rules
├── PROGRESS.md # implementation history and team handoff
├── BLOCKERS.md # current blockers
└── README.md # project entry point
app/backend/main.py is the composition root. At startup it loads the detection index, opens the Milvus client, and optionally loads FG-CLIP once into application state. The search module owns the public HTTP contract, request orchestration, result shaping, and local submission validation.
For the current runtime boundaries and planned evolution, read Architecture. For backend data contracts and offline evaluation, see the backend README and evaluation README.
Backend settings read environment variables and app/backend/.env. Relative backend paths resolve from app/backend.
| Group | Settings | Purpose |
|---|---|---|
| Retrieval service | ZILLIZ_URI, ZILLIZ_TOKEN, MILVUS_COLLECTION | Connect to the hybrid-search collection. |
| Model runtime | LOAD_FG_CLIP_ON_STARTUP, FG_CLIP_DEVICE, HF_TOKEN | Control the encoder lifecycle and device. |
| Local data | OBJECTS_CSV_PATH, DATA_DIR, KEYFRAMES_DIR, KEYFRAME_MAP_DIR | Locate detection metadata and served media. |
| API presentation | HOST, PORT, API_PREFIX, FRAME_IMAGE_URL_TEMPLATE | Configure the FastAPI process and result image URLs. |
| Frontend origin | VITE_API_URL, VITE_STATIC_MEDIA_URL | Configure the API proxy and production static-media origin. |
ZILLIZ_TOKEN and HF_TOKEN are secrets. Keep them server-side in the backend environment; values prefixed with VITE_ are browser-visible and must not contain secrets.
Common settings are listed below; the full field list lives in app/backend/.env.example.
| Command | Purpose |
|---|---|
cd app/backend && uv sync --locked --group dev | Install locked backend and test dependencies. |
cd app/backend && uv run python main.py | Run FastAPI with the configured host and port. |
cd app/backend && uv run pytest | Run the backend test suite. |
cd app/backend && uv run pytest tests/evaluation -q | Run focused offline evaluation tests. |
cd app/frontend && npm ci | Install the locked frontend dependencies. |
cd app/frontend && npm test | Run frontend unit tests. |
cd app/frontend && npm run build | Build the frontend production bundle. |
Run the narrowest check that proves your change. Before sharing a cross-stack change, run:
(cd app/backend && uv run pytest)
(cd app/frontend && npm test && npm run build)
For retrieval-quality changes, export rankings and use the offline evaluation runner rather than treating a successful API start as relevance evidence. The runner contract and command are documented in app/backend/evaluation/README.md.
data/; do not copy it into Vite public or dist.Python
44.6%
JavaScript
27.6%
CSS
18.6%
Jupyter Notebook
9.1%
A local video-frame retrieval workspace for HCM AI Challenge tasks, helping an operator find, inspect, and record KIS, VQA, TRAKE, and image-reference answers.
BoldSearch pairs a React operator interface with a FastAPI retrieval API. It creates FG-CLIP text or image embeddings, searches a Zilliz/Milvus collection, enriches results with object-detection metadata, and serves the local keyframe corpus for visual verification.
The in-app Submit action validates and accepts a payload locally. Official BTC delivery is a separate CSV-and-ZIP workflow; see the submission guide.
| Retrieval and review | Task workflow |
|---|---|
| Text, object, and image-reference search Search frame embeddings from text queries, optional object hints, or an uploaded visual cue. | KIS and VKIS Find a known target frame from text or an image reference. |
| Staged temporal narrowing Use multiple text queries to scope later retrieval stages to the preceding result context. | VQA Select a frame and record a free-text answer. |
| Frame inspection Open returned keyframes, load per-video frame maps, and inspect nearby frames before choosing an answer. | TRAKE Select multiple ordered frames for temporal key events; submissions are grouped one request per video. |
| Offline evaluation Evaluate exported rankings against task cards without starting FastAPI, FG-CLIP, or Milvus. | Local media serving Keep the keyframe corpus outside the frontend bundle while serving it through FastAPI. |
| Requirement | Purpose |
|---|---|
| Python 3.12+ and uv | Backend dependencies and commands |
| Node.js and npm | React development server |
| A Zilliz/Milvus collection compatible with the configured FG-CLIP encoder | Hybrid frame retrieval |
| Local keyframes, frame maps, and detection metadata | Result images, frame navigation, and object enrichment |
Keep the media corpus outside the Vite application bundle. Directories fall into four categories — see the tracked data/README.md contract for the full table:
data/ # machine-local; populated from team storage or BTC packages
├── keyframes/ # served corpus: keyframe images
├── map-keyframes/ # served corpus: per-video frame maps
├── aic2026-downloads/ # raw BTC packages
├── aic2026-<round>/ # per-round working dirs (ZIP, results, picks)
└── frames|metadata|vectors/ # per-video derived artifacts
app/backend/
└── detections.csv # tracked frame object-detection metadata
Create an ignored app/backend/.env file and provide the connection settings for your environment. At minimum, configure ZILLIZ_URI, ZILLIZ_TOKEN, and MILVUS_COLLECTION; use OBJECTS_CSV_PATH, DATA_DIR, or FG_CLIP_DEVICE only when their defaults do not fit your machine or file layout.
Do not commit credentials, local data, model artifacts, or generated evaluation output.
cd app/backend
uv sync --locked --group dev
uv run python main.py
The API starts on http://localhost:8000 by default. Confirm the process is responding before starting the UI:
curl http://localhost:8000/api/health
cd app/frontend
npm ci
npm run dev
Open http://localhost:5173. During development, Vite proxies /api, /keyframes, and /map-keyframes to http://localhost:8000 unless VITE_API_URL overrides the backend origin.
POST /api/search/query for text/object retrieval or POST /api/search/visual_query for image-reference retrieval.detections.csv index.data/ so the UI can display and inspect the evidence.| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Confirm that the FastAPI process is responding. |
POST | /api/search/query | Search from text queries and optional object hints. |
POST | /api/search/visual_query | Search from an image cue or image embedding. |
POST | /api/search/submit/kis | Validate a local KIS frame selection. |
POST | /api/search/submit/vqa | Validate a local VQA frame-and-answer selection. |
POST | /api/search/submit/trake | Validate local ordered TRAKE frame selections. |
POST | /api/search/submit | Legacy single-payload submit alias kept for compatibility. |
The backend also serves /keyframes and /map-keyframes from the configured local data directories.
.
├── app/
│ ├── backend/ # FastAPI API, FG-CLIP encoder, Milvus access, and evaluation runner
│ └── frontend/ # Vite React operator interface
├── docs/ # architecture, diagrams, operational guides, and competition knowledge
├── okf/ # OKF knowledge bundle with provenance (start at okf/index.md)
├── data/ # machine-local data; tracked layout contract in data/README.md
├── src/ # exploratory notebooks and analysis spikes
├── .github/ # Copilot instructions and CI workflows
├── AGENTS.md # coding-agent guidance
├── CLAUDE.md # Claude Code entry (imports AGENTS.md)
├── GIT_CONVENTION.md # branch and commit rules
├── PROGRESS.md # implementation history and team handoff
├── BLOCKERS.md # current blockers
└── README.md # project entry point
app/backend/main.py is the composition root. At startup it loads the detection index, opens the Milvus client, and optionally loads FG-CLIP once into application state. The search module owns the public HTTP contract, request orchestration, result shaping, and local submission validation.
For the current runtime boundaries and planned evolution, read Architecture. For backend data contracts and offline evaluation, see the backend README and evaluation README.
Backend settings read environment variables and app/backend/.env. Relative backend paths resolve from app/backend.
| Group | Settings | Purpose |
|---|---|---|
| Retrieval service | ZILLIZ_URI, ZILLIZ_TOKEN, MILVUS_COLLECTION | Connect to the hybrid-search collection. |
| Model runtime | LOAD_FG_CLIP_ON_STARTUP, FG_CLIP_DEVICE, HF_TOKEN | Control the encoder lifecycle and device. |
| Local data | OBJECTS_CSV_PATH, DATA_DIR, KEYFRAMES_DIR, KEYFRAME_MAP_DIR | Locate detection metadata and served media. |
| API presentation | HOST, PORT, API_PREFIX, FRAME_IMAGE_URL_TEMPLATE | Configure the FastAPI process and result image URLs. |
| Frontend origin | VITE_API_URL, VITE_STATIC_MEDIA_URL | Configure the API proxy and production static-media origin. |
ZILLIZ_TOKEN and HF_TOKEN are secrets. Keep them server-side in the backend environment; values prefixed with VITE_ are browser-visible and must not contain secrets.
Common settings are listed below; the full field list lives in app/backend/.env.example.
| Command | Purpose |
|---|---|
cd app/backend && uv sync --locked --group dev | Install locked backend and test dependencies. |
cd app/backend && uv run python main.py | Run FastAPI with the configured host and port. |
cd app/backend && uv run pytest | Run the backend test suite. |
cd app/backend && uv run pytest tests/evaluation -q | Run focused offline evaluation tests. |
cd app/frontend && npm ci | Install the locked frontend dependencies. |
cd app/frontend && npm test | Run frontend unit tests. |
cd app/frontend && npm run build | Build the frontend production bundle. |
Run the narrowest check that proves your change. Before sharing a cross-stack change, run:
(cd app/backend && uv run pytest)
(cd app/frontend && npm test && npm run build)
For retrieval-quality changes, export rankings and use the offline evaluation runner rather than treating a successful API start as relevance evidence. The runner contract and command are documented in app/backend/evaluation/README.md.
data/; do not copy it into Vite public or dist.Python
44.6%
JavaScript
27.6%
CSS
18.6%
Jupyter Notebook
9.1%