Introduction
Minimally invasive surgeries, such as laparoscopy, generate vast amounts of endoscopic video data. These recordings are invaluable for surgical training, quality assurance, and the development of Surgical Data Science (SDS) AI models. However, building multicentric datasets remains a significant challenge due to data heterogeneity and strict privacy regulations like GDPR and HIPAA.
Surgical videos are often fragmented into multiple files due to legacy storage limitations (e.g., FAT32's 4GB limit) and contain sensitive "out-of-body" scenes showing patient faces or operating room staff. Existing management solutions are frequently proprietary and tied to expensive hardware, creating vendor lock-in. To address these barriers, we introduce Endoshare, a free, source-available desktop application designed to automate the merging, standardization, and de-identification of surgical videos.
System Architecture
Endoshare is built on a three-layer architecture designed to balance complex video processing with a user-friendly interface for clinical staff.
- Presentation Layer: A graphical user interface (GUI) developed with
PyQt5. This allows surgeons and researchers to manage data without needing command-line expertise. - Application Layer: The core logic uses Python,
FFmpeg, andTensorFlow. It handles the stitching of fragmented video parts and performs AI-powered de-identification. - Data Layer: This layer manages input/output operations, including the automatic removal of metadata and the implementation of pseudonymization.
Core Functionalities and AI De-Identification
The primary goal of Endoshare is to transform raw, sensitive surgical footage into research-ready datasets through three key steps.
Merging and Standardization
The tool automatically detects and merges fragmented video files into a single, standardized format. This eliminates the manual labor typically required to reconstruct a full surgical procedure from multiple segments.
Privacy-by-Design
Privacy is handled through two mechanisms:
- Pseudonymization: Filenames are replaced with unique UUIDs. A local mapping file (e.g., a spreadsheet) links these UUIDs back to patient IDs, ensuring that identifiable information never leaves the hospital's secure environment.
- AI-Powered De-Identification: The system utilizes a MobileNetV2 backbone with LSTM layers to detect "out-of-body" scenes. These segments—such as when the camera is being inserted or removed—are automatically blurred to protect the privacy of patients and staff.
Processing Modes
To optimize workflow, Endoshare offers two processing modes. Advanced mode re-encodes the entire video to ensure complete uniformity. Fast mode identifies specific sensitive segments and only re-encodes those parts, leaving the rest of the video in its original state.
Results and Usability
Technical benchmarking across Windows, Mac, and Linux environments demonstrated that processing time scales linearly with video length. Notably, the Fast mode provided a massive performance boost, reducing processing time by an average of 78.7% compared to full re-encoding. In practical terms, Fast mode processed videos at approximately 9.22 seconds per minute of footage.
The software's usability was evaluated by 10 external surgeons using the Technology Acceptance Model (TAM). The results indicated high acceptance, with Perceived Usefulness scoring 5.07/7 and Perceived Ease of Use scoring 5.15/7. Participants gave the tool a high recommendation score of 9.2/10, highlighting the value of a GUI-driven, local-first approach.
Limitations and Future Outlook
While Endoshare significantly lowers the barrier to data sharing, some limitations remain. The current AI model focuses on scene detection and does not yet redact sensitive text (e.g., patient names) that may be overlaid on the video by the endoscopic tower. Future iterations will include a manual review interface to allow users to verify AI classifications and improved GPU resource allocation to further enhance processing speeds.
By providing a privacy-preserving, cross-platform tool, Endoshare empowers clinical institutions to contribute to large-scale surgical AI research without compromising patient privacy or requiring extensive technical resources.
Summary updated