feat: add bbox_size field for frontend filtering
- Database: Added bbox_size column (min(width, height)) to face_filter_features - API: Updated all endpoints to include bbox_size in responses - Documentation: Added bbox_size explanation and frontend filtering examples - Maintains current Swift implementation calculation method - Enables efficient frontend filtering without backend threshold This allows the frontend to do real-time filtering using bbox_size while the backend pre-computes and stores the value.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- Migration: Add bbox_size to face_filter_features table
|
||||
|
||||
-- Add bbox_size column
|
||||
ALTER TABLE face_filter_features
|
||||
ADD COLUMN IF NOT EXISTS bbox_size INTEGER;
|
||||
|
||||
-- Add index for bbox_size filtering
|
||||
CREATE INDEX IF NOT EXISTS idx_face_filter_bbox_size ON face_filter_features(bbox_size);
|
||||
|
||||
-- Comment: bbox_size is pre-computed as min(width, height) for efficient frontend filtering
|
||||
COMMENT ON COLUMN face_filter_features.bbox_size IS 'Pre-computed bbox size: min(width, height) in pixels';
|
||||
Reference in New Issue
Block a user