New Object Mask Effect + Improve UI for local AI Effects#6050
Merged
Conversation
- Add ObjectMask preprocessing options with EdgeSAM encoder/decoder paths - Add XMem ONNX model path fields with validation indicators - Add point/region selection flow using the existing region annotation UI - Convert preview-space prompt coordinates to source-frame coordinates - Pass prompt keyframes, points, rects, and model paths to libopenshot - Gate processing until required models and a valid positive prompt exist - Add focused initializer and payload conversion tests - New icons for Object Mask effect
- Default ObjectMask preprocessing to EfficientSAM ONNX instead of EdgeSAM files - Add interactive seed-frame mask preview in the region annotation dialog - Scale annotation points against actual processing frame dimensions - Fix region preview frame-size tracking during partial repaints - Render ObjectMask preview with translucent blue fill and outline - Fix initial frame painting without the old frame 2 then frame 1 jump - Apply themed videoPreview background styling in the region dialog - Update ObjectMask and VideoWidget tests
- Add YOLO, EfficientSAM, and Cutie models.json resource manifests for Object Detection and Object Mask. - Drive model/version/quality dropdowns from resource JSON instead of hardcoded file choices. - Use default model paths under ~/.openshot_qt/yolo/<model-id>/. - Add Object Mask quality selection with compact labels and consistent copy. - Hide model file path fields behind an Advanced link while keeping CPU/GPU selection visible in the main flow. - Validate selected model files before enabling point/rect selection. - Improve model download readiness checks, partial download handling, status display, and debug logging. - Extract UI-visible model names/descriptions into the translation POT and translate dropdown labels at runtime. - Trim UI manifests to omit YOLOv8 and Cutie Very High while leaving them available in openshot-onnx. - Update tests for model manifest defaults, dropdown labels, and Object Mask readiness behavior.
- Defaults Object Detection/Object Mask processing device to CPU.
- Keeps explicit GPU (Auto), GPU (CUDA), and GPU (OpenCL) choices.
- Enforces Object Mask prompt limits in region selection:
- 6 include/model slots
- include rect consumes 2 slots
- max 3 include rects
- max 8 exclude filters
- Sanitizes annotation payloads before preview/accept.
- Keeps selection button compact: Selection: X include[, Y exclude].
- Removes live toolbar/screen counters.
- Includes positive/negative rects in Object Mask preprocessing context.
# Conflicts: # src/windows/process_effect.py
Member
Author
- The clamp now distinguishes between: - point prompts: capped at valid pixel centers, width - 1 / height - 1 - rectangle edges: allowed to reach the full frame boundary, width / height
- Ensure project saves update info.PROTOBUF_DATA_PATH to the active project assets folder, create the protobuf_data asset subfolder by default, and copy referenced effect .data files before rewriting protobuf_data_path. - This prevents Object Detection/Object Mask projects from saving paths to missing protobuf files when effects were processed after an initial save or from a stale runtime/project protobuf folder. Added regression coverage for stale protobuf relocation and asset folder creation.
…k higher resolution images.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Much improved UI for downloading / validating local AI models used in Object Detection and Object Mask effects. Plus an interactive mask tool, to select masks using AI interactively - before propagating the mask throughout the entire video.