Add image selection refinement functionality with BEN2 integration

- Implemented viewport.py for handling 3D view projections, gestures, and overlay drawing.
- Created refine_image_selection.py to manage the refinement of gesture masks and output image bounds.
- Added selection module with refine_selection.py to process and crop images based on alpha channel visibility.
- Introduced __init__.py for selection module to expose refine_selection function.
This commit is contained in:
2026-08-31 22:10:05 +08:00
parent 14d63001d2
commit c97b4a3e41
76 changed files with 2127 additions and 1137 deletions

View File

@@ -8,7 +8,7 @@ from ...server.media.resolution import (
MAX_MAX_AI_INPUT_SIZE,
MIN_MAX_AI_INPUT_SIZE,
)
from ...common.ai_job import (
from ...common.ai import (
invoke_ai_setup_if_needed,
moge2_parameters,
production_device,
@@ -16,7 +16,7 @@ from ...common.ai_job import (
require_input_path,
require_model,
)
from ...common.image_data import (
from ...common.image import (
cleanup_image_input,
image_user_settings,
is_image_empty,
@@ -24,7 +24,7 @@ from ...common.image_data import (
source_start_frame,
video_total_frames,
)
from ...common.object import create_image_material
from ...common.material import create_image_material
from .object import (
create_color_image,
create_depth_plane_from_result,

View File

@@ -2,20 +2,20 @@
import bpy
from ...common.image_data import (
from ...common.image import (
color_data_name,
image_empty_bounds,
image_pixels,
load_color_result_image,
require_image_empty,
)
from ...common.depth_data import (
from ...common.depth import (
depth_uniform_scale,
load_depth_metadata,
load_depth_result_image,
)
from ...common.material import create_image_material
from ...common.object import (
create_image_material,
finalize_object_result,
modifier_input_identifier,
set_modifier_input,