3 Commits

Author SHA1 Message Date
konstantin-paulus
1882b539c9 Enhance SAM 2.1 video tracking functionality and update export parameters
- Updated `export.py` to include model size as a parameter for ONNX graph exports, improving flexibility in model loading.
- Refactored the `load` function to accept a checkpoint string, allowing dynamic model loading based on specified size.
- Introduced new methods in `tracker.ts` for holding and previewing frames, enhancing the user experience during object segmentation.
- Updated type exports in `video.ts` to include `FrameRequest`, facilitating better integration with the tracking system.
- Improved documentation and comments throughout the codebase for clarity on new features and functionality.
2026-09-26 16:45:06 +02:00
konstantin-paulus
70b2fa3ddf Remove convert_fp16.py script and introduce export.py for ONNX model export
- Deleted the `convert_fp16.py` script, which was responsible for converting ONNX models from fp32 to fp16.
- Added `export.py` script to export fixed-shape ONNX graphs for SAM 2.1 video tracking, ensuring compatibility with input parameters for image size and memory frames.
- Updated `constants.ts` to reflect changes in model repository links and fixed shapes for `IMAGE_SIZE` and `MEMORY_FRAMES`.
- Adjusted memory management and constants in various source files to align with the new export functionality.
2026-09-26 10:22:23 +02:00
konstantin-paulus
6d275f1a61 Add fp16 conversion script and update model repository links
- Introduced `convert_fp16.py` script for converting ONNX models from fp32 to fp16, optimizing memory usage while maintaining input/output compatibility.
- Updated `MODEL_REPO` in `constants.ts` to point to the new fp16 model repository, reflecting changes in model file sizes.
- Enhanced `weights.ts` to retain model files in the cache, improving file management during model loading.
2026-09-26 09:39:17 +02:00