Skip to content

Add HolmesVAU Gradio Demo App + Backend Improvements (GPU, Indexing)#7

Open
jungseoik wants to merge 5 commits into
pipixin321:masterfrom
jungseoik:master
Open

Add HolmesVAU Gradio Demo App + Backend Improvements (GPU, Indexing)#7
jungseoik wants to merge 5 commits into
pipixin321:masterfrom
jungseoik:master

Conversation

@jungseoik

Copy link
Copy Markdown

✨ Summary

This PR introduces a Gradio-based demo interface for HolmesVAU and includes multiple improvements to enhance backend compatibility, robustness, and usability.


Commits Overview

✅ [fixed] Make anomaly scorer GPU allocation dynamic instead of fixed to GPU 0 and 1

  • Refactored torch.load(...) with map_location=self.device to ensure the anomaly scorer loads properly on any available GPU setup.
  • Previously hardcoded to cuda:0,1, which was incompatible with some environments.

✅ [fixed] frame and patch list indexing by casting sampled indices to int

  • Fixed a subtle bug where sampled_idxs may contain float values, which are unsafe for direct indexing.
  • Now explicitly casts each index to int for stable frame/patch retrieval.

✅ [fixed] pydantic==2.10.6 dependency add

  • Added a fixed version of pydantic to ensure consistent behavior with Gradio & FastAPI.

✅ [feat] gradio demo app add

  • Introduced app.py with a full Gradio Blocks interface:
    • Upload video input
    • Enter custom prompt
    • Get model prediction
    • See anomaly plot or "uniform sampling" flat plot
    • Browse keyframes via slider

[add] demo mp4 add

  • Included a sample .mp4 video for testing/demo purposes.

🖥️ Demo Features

  • 🎥 Video Upload + Prompt Input
  • 📈 Anomaly Score Plot (flat if uniform sampling)
  • 📸 Keyframe browsing with slider
  • ✅ Supports cases with or without anomaly scores

📝 Notes

  • Compatible with both single and multi-GPU machines
  • Works with uniform or ATS-based frame sampling
  • Keyframe images are saved to keyframes/ for interactive exploration

📸

holmes_vau_demo.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant