10 Commits
Author SHA1 Message Date
Cherokee 85e2dc2fd2 feat: add bg_color option for cutout background (transparent/green/blue/black/white)
Default is transparent (WebM with VP9 alpha). Colored backgrounds output
MP4 with the selected solid color filling non-person pixels.
Transparent previews saved as PNG, colored as JPG.
2026-04-30 16:35:17 +08:00
Cherokee 322f8d9b71 improve: performance optimization — downscale inference, defer green screen, add skip_every_n
- Optimization 1: Downscale frames to 640px max-side before YOLOv8-seg
  inference in segmenter.py, resize masks back to original resolution
  (~13% speedup from reduced post-processing)
- Optimization 2: Store bool masks instead of composited BGR frames in
  MaskActor.frames (~97% memory reduction per tracked frame, from ~6MB
  to ~200KB per entry). Green screen now applied on-the-fly during
  encoding rather than during tracking.
- Optimization 3: Add skip_every_n parameter to VideoActorExtractor
  (default 1=all, 2=every other frame, up to 30). Users can trade
  precision for speed.
- Add per-substep timing (Detection vs Tracking) printed after frame loop
2026-04-30 14:04:35 +08:00
Cherokee 2092da6623 feat: auto-check and download missing models at pipeline start
- Add core/model_utils.py with ensure_models_exist() function
- Auto-download yolov8n.pt and yolov8n-seg.pt from GitHub if missing
- Auto-download InsightFace buffalo_l via InsightFace API if missing
- Handle InsightFace path quirk (models/buffalo_l/ -> buffalo_l/)
- Call ensure_models_exist() at start of VideoActorExtractor.extract()
2026-04-30 11:06:14 +08:00
Cherokee 63fc34bd5a fix: improve identity clustering + model paths to ComfyUI/models/video-actor-extract 2026-04-23 15:38:30 +08:00
Cherokee eef072e85e feat: integrate PersonSegmenter for mask-based green screen extraction
- Replace bbox crop with YOLOv8-seg person segmentation
- Full-frame green screen: only person silhouette kept
- Top 5 preview images per actor by mask area (IMAGE output)
- Accurate time segmentation: only frames where person is visible
- No green gaps between segments
- Add seg_model_path parameter
2026-04-22 17:08:54 +08:00
Cherokee 4c04bcfc26 test: full pipeline test passed
- YOLOv8 model downloaded successfully (6.5MB)
- Tested with sample_demo_1.mp4 (640x360, 25fps, 9.7s)
- Detected 1 actor (actor_0)
- Output: actor_0.mp4 (497KB, green screen cropped)
- Output: actor_info.json (valid JSON with frame ranges)
- Node loads correctly in ComfyUI environment
- Symlink to custom_nodes verified
2026-04-21 17:21:03 +08:00
Cherokee 67fdc05c9c fix: import DEFAULT_YOLO_MODEL in actor_extractor node 2026-04-20 15:01:07 +08:00
Cherokee 6e6564ff6a feat: add model_path parameter and README
- Added model_path input to VideoActorExtractor node
- Added comprehensive README with setup instructions
- Cleaned up test artifacts
2026-04-20 14:59:51 +08:00
Cherokee 968b9e6b19 feat: initial implementation of VideoActorExtract plugin
- YOLOv8 person detection (ultralytics)
- ByteTrack multi-object tracking (with greedy fallback)
- InsightFace face recognition + cosine similarity clustering
- Green screen actor cropping
- Multi-segment video merging with ffmpeg
- ComfyUI node: VideoActorExtractor (category: video/actor)
- Output: per-actor MP4 + actor_info.json
2026-04-20 14:36:09 +08:00
Cherokee e88b73dafd Initial commit: requirements and architecture docs 2026-04-20 14:09:02 +08:00