How infinte-aditya/gastrovision-4.0 works
GastroVision is a local Windows desktop application and research prototype for analyzing endoscopy videos. A user selects a video in the PyQt interface; the local API accepts it and invokes the analysis pipeline, which extracts and filters frames, classifies them, computes a temporal verdict, and generates explanatory heatmaps for selected frames. The interface retrieves and presents the results. The README also describes model training and shared preprocessing as a research capability. Edges follow excerpted calls or documented behavior; training links are limited to README evidence.
Main entry points: main.py Analysis pipeline · paths.py Analysis outputs · gastrovision_single.py Desktop UI · server.py Local API
Components 17
Desktop application
- Desktop UI
frontend/gastrovision_single.py - App information
frontend/app_info.py - Local API
backend/server.py
Video analysis
- Analysis pipeline
backend/main.py - Frame extraction
backend/video_processing/frame_extractor.py - Frame quality filter
backend/video_processing/frame_selector.py - Frame scoring
backend/scoring/frame_scoring.py - Video verdict
backend/scoring/video_scoring.py
Inference and explanation
- ONNX predictor
backend/model/predictor.py - Image preprocessing
backend/model/preprocess.py - CAM heatmaps
backend/visualization/heatmap.py
Local data
- Data paths
backend/paths.py - Analysis outputs
backend/paths.py
Model research
- Model training
ml/gastrovision_train.ipynb - Training preprocessing
ml/gastrovision_preprocess.py
Other components
- Video analyst
- FFmpeg
Connections 21
- Video analyst → Desktop UI: selects video
README.md - Desktop UI → App information: reads info
frontend/gastrovision_single.py - Desktop UI → Local API: sends requests
frontend/gastrovision_single.py - Local API → Analysis pipeline: invokes analysis
backend/server.py - Analysis pipeline → Frame extraction: extracts frames
backend/main.py - Analysis pipeline → Frame quality filter: filters frames
backend/main.py - Analysis pipeline → ONNX predictor: classifies frames
backend/main.py - Analysis pipeline → Video verdict: summarizes video
backend/main.py - Analysis pipeline → Frame scoring: computes stats
backend/main.py - Analysis pipeline → CAM heatmaps: generates heatmaps
backend/main.py - ONNX predictor → Image preprocessing: preprocesses images
backend/model/predictor.py - CAM heatmaps → ONNX predictor: requests CAM
backend/visualization/heatmap.py - Frame extraction → FFmpeg: decodes video
backend/video_processing/frame_extractor.py - Analysis pipeline → Data paths: resolves data paths
backend/main.py - Local API → Data paths: stores uploads
backend/server.py - Data paths → Analysis outputs: provides output location
backend/paths.py - Video verdict → Analysis outputs: reads frame scores
backend/scoring/video_scoring.py - Frame scoring → Analysis outputs: reads and writes scores
backend/scoring/frame_scoring.py - CAM heatmaps → Analysis outputs: writes heatmaps
backend/visualization/heatmap.py - Model training → Training preprocessing: uses preprocessing
README.md - Training preprocessing → Image preprocessing: shares implementation
README.md