Skip to content

Liwei-Ji/DISE-AI

Repository files navigation

DISE AI Agent - Endoscopy Analysis Platform

DISE AI Agent is an intelligent assistant designed for Drug-Induced Sleep Endoscopy (DISE). It integrates computer vision and Large Language Models (LLM) to assist physicians in identifying critical airway obstruction moments and providing quantitative analysis data.

Core Features

  • Multi-Mode Input: Supports local video file uploads and public video links for remote analysis.
  • Precise Interval Selection: Includes a time-parsing engine that allows users to analyze specific segments (e.g., "0:10-0:50") or the entire video duration.
  • Site-Specific Analysis: Provides independent AI analysis for the V-Site (Velum/Soft Palate) and O-Site (Oropharynx).
  • Automated Status Tracking: Utilizes a polling mechanism to provide real-time updates on AI processing progress via task IDs.
  • Interactive Data Correction: An Annotation Modal allows physicians to view polygon overlays and manually correct analysis results, including obstruction percentages.
  • Medical Knowledge Chat: Features a text-based chat mode for consulting medical knowledge or discussing specific analysis results.
  • Report Generation: Includes a dedicated action to trigger the automated generation of professional medical analysis reports.

Technical Stack

  • Frontend Framework: React 18 (TypeScript).
  • Styling: Tailwind CSS for responsive medical-grade UI.
  • Icons: Lucide React and Heroicons.
  • State Management: React Hooks including useState, useRef, and useEffect.
  • Communication: Fetch API with support for ngrok header bypass for local development.

Workflow (State Machine)

The application manages complex analysis flows through a structured state machine to ensure a clear user path:

  1. WAITING: Initial state awaiting video upload or link input.
  2. AWAITING_TIME: Metadata loaded; the system requests a specific analysis timeframe.
  3. AWAITING_SITE: Timeframe confirmed; the user selects the anatomical site (V or O).
  4. ANALYZING: Backend task initiated with 3-second polling to update progress.
  5. DONE: Results displayed, comparing the "Worst" (maximum obstruction) and "Best" (maximum opening) moments.

API Specifications

1. Initiate Analysis (POST /analyze)

  • Payload: Supports FormData for local files or JSON for video URLs.
  • Parameters: Includes start/end times and the target anatomical site (V-Site or O-Site).

2. Status Polling (GET /status/{task_id})

  • Response: Returns current task status (pending, analyzing, completed, or failed) and the numerical progress percentage.

About

DISE AI is a medical AI agent combining U-Net based image recognition, LLMs and retrieval-augmented generation RAG.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors