CoolFace
Apppublic

Bopa-Boptech/VLM-Cholecystectomie

sourceHugging Faceupdated 7mo agoView on Hugging Face
0likes
App README

Surgical Phase Recognition Demo

This Hugging Face Space demonstrates two models for surgical phase recognition:

  1. 1.VLM (Baseline): A Vision-Language Model (Qwen2-VL based)
  2. 2.ViT (Vision Transformer): A specialized surgical transformer

Setup

The app is designed to run on Hugging Face Spaces (CPU Basic tier). Because the VLM is too heavy to run in real-time on CPU, we use pre-computed predictions for the demo.

Pre-computing Predictions

To update the predictions (e.g., after changing models or data), run the precomputation script on a machine with a GPU:

bash
cd hf_space
uv run precompute_predictions.py

This will generate data/test_df_with_preds.csv. The app.py will automatically detect this file and use it to serve predictions instantly.

Running the App

To run the app locally:

bash
cd hf_space
uv run app.py

This demo runs in lightweight mode using precomputed predictions only. Live inference is disabled to support free CPU tier deployment.