73 lines
1.7 KiB
Python
73 lines
1.7 KiB
Python
"""
|
|
Face Mask Blur - Blender 5.0 Extension
|
|
Detect faces and apply blur in VSE for privacy protection.
|
|
"""
|
|
|
|
bl_info = {
|
|
"name": "Face Mask Blur",
|
|
"blender": (5, 0, 0),
|
|
"category": "Sequencer",
|
|
"version": (0, 2, 0),
|
|
"author": "Hare",
|
|
"description": "Detect faces and apply blur in VSE for privacy protection",
|
|
}
|
|
|
|
|
|
def register():
|
|
"""Register all extension components."""
|
|
import bpy
|
|
from bpy.props import FloatProperty
|
|
|
|
from . import operators
|
|
from . import panels
|
|
|
|
# Register scene properties for face detection parameters
|
|
bpy.types.Scene.facemask_conf_threshold = FloatProperty(
|
|
name="Confidence",
|
|
description="YOLO confidence threshold (higher = fewer false positives)",
|
|
default=0.5,
|
|
min=0.1,
|
|
max=1.0,
|
|
step=0.01,
|
|
)
|
|
|
|
bpy.types.Scene.facemask_iou_threshold = FloatProperty(
|
|
name="IOU Threshold",
|
|
description="Non-maximum suppression IOU threshold",
|
|
default=0.45,
|
|
min=0.1,
|
|
max=1.0,
|
|
step=0.01,
|
|
)
|
|
|
|
bpy.types.Scene.facemask_mask_scale = FloatProperty(
|
|
name="Mask Scale",
|
|
description="Scale factor for mask region (1.0 = exact face size)",
|
|
default=1.5,
|
|
min=1.0,
|
|
max=3.0,
|
|
step=0.1,
|
|
)
|
|
|
|
operators.register()
|
|
panels.register()
|
|
|
|
|
|
def unregister():
|
|
"""Unregister all extension components."""
|
|
import bpy
|
|
from . import operators
|
|
from . import panels
|
|
|
|
panels.unregister()
|
|
operators.unregister()
|
|
|
|
# Unregister scene properties
|
|
del bpy.types.Scene.facemask_conf_threshold
|
|
del bpy.types.Scene.facemask_iou_threshold
|
|
del bpy.types.Scene.facemask_mask_scale
|
|
|
|
|
|
if __name__ == "__main__":
|
|
register()
|