real time face swap and one-click video deepfake with only a single image
This report presents the forensic synthetic code analysis of hacksider/Deep-Live-Cam, a Python project with 94,883 GitHub stars. SynthScan v2.0 examined 9,080 lines of code across 53 source files, recording 200 pattern matches distributed across 10 syntactic categories. The overall adjusted score of 36.6 places this repository in the Strong AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 200 distinct pattern matches across 10 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | modules/ui.py | 85 | # ─── constants ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 109 | # ─── modern dark stylesheet ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 241 | # ─── image utilities ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 297 | # ─── persistence ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 352 | # ─── thread-safe status bridge ─────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 368 | # ─── public API ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 398 | # ─── camera enumeration (unchanged from tk version) ────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 428 | # ─── main window ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 511 | # ── image row ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 565 | # ── options card ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 633 | # ── sliders card ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 674 | # ── action row ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 697 | # ── camera card ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 725 | # ── slot handlers ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 952 | # ─── preview window (still-image / video scrub) ────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 1005 | # ─── webcam preview window ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 1257 | # ─── mapper dialogs (image/video + live) ──────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 1504 | # ─── entry point ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | modules/ui.py | 216 | # ─── module-level state ─────────────────────────────────────────────────── | STRING |
| MEDIUM⚡ | modules/gpu_processing.py | 52 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | modules/gpu_processing.py | 54 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 26 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 28 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 82 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 84 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 114 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 116 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 142 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 144 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 181 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 183 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 226 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 228 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 251 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 253 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 277 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/gpu_processing.py | 279 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 97 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 99 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 209 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 215 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 351 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 353 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 426 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 437 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 531 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/onnx_optimize.py | 533 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 1097 | # ========================== | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 1099 | # ========================== | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/face_analyser.py | 215 | except Exception as e: # pragma: no cover - never break the swap | CODE |
| MEDIUM | modules/face_analyser.py | 216 | print(f"Error computing 2d106 landmarks: {e}") | CODE |
| MEDIUM | modules/ui.py | 410 | print(f"Error detecting cameras: {exc}") | CODE |
| LOW⚡ | modules/ui.py | 1232 | except Exception: | CODE |
| LOW⚡ | modules/ui.py | 1237 | except Exception: | CODE |
| LOW⚡ | modules/ui.py | 1241 | except Exception: | CODE |
| LOW | modules/ui.py | 409 | except Exception as exc: | CODE |
| LOW | modules/ui.py | 795 | except Exception as exc: | CODE |
| LOW | modules/__init__.py | 19 | except Exception: | CODE |
| LOW | modules/__init__.py | 37 | except Exception: | CODE |
| MEDIUM | modules/__init__.py | 13 | def imread_unicode(path, flags=cv2.IMREAD_COLOR): | CODE |
| MEDIUM | modules/__init__.py | 27 | def imwrite_unicode(path, img, params=None): | CODE |
| LOW | modules/core.py | 220 | except Exception as e: | CODE |
| MEDIUM | modules/core.py | 221 | print("Error copying file:", str(e)) | CODE |
| LOW⚡ | modules/gpu_processing.py | 48 | except Exception: | CODE |
| LOW | modules/platform_info.py | 26 | except Exception: | CODE |
| LOW | modules/platform_info.py | 34 | except Exception: | CODE |
| MEDIUM | modules/platform_info.py | 22 | def _detect_torch_cuda() -> bool: | CODE |
| MEDIUM | modules/platform_info.py | 30 | def _detect_onnx_providers() -> List[str]: | CODE |
| LOW | modules/utilities.py | 37 | except Exception as error: | CODE |
| LOW | modules/utilities.py | 59 | except Exception: | CODE |
| LOW | modules/utilities.py | 347 | except Exception: | CODE |
| LOW | modules/video_capture.py | 72 | except Exception: | CODE |
| LOW | modules/video_capture.py | 108 | except Exception as e: | CODE |
| LOW | modules/video_capture.py | 154 | except Exception: | CODE |
| LOW | modules/onnx_optimize.py | 124 | except Exception: | CODE |
| LOW | modules/processors/frame/face_enhancer.py | 106 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_enhancer.py | 369 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 71 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 81 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 106 | except Exception as e: | CODE |
| MEDIUM | modules/processors/frame/core.py | 107 | print(f"Error processing frame: {e}") | CODE |
| LOW | modules/processors/frame/core.py | 159 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 312 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 318 | except Exception: | CODE |
| LOW | modules/processors/frame/core.py | 398 | except Exception as e: | CODE |
| LOW | modules/processors/frame/core.py | 406 | except Exception: | CODE |
| LOW | modules/processors/frame/face_enhancer_gpen512.py | 73 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_enhancer_gpen512.py | 78 | except Exception as e: | CODE |
| LOW | modules/processors/frame/_onnx_enhancer.py | 85 | except Exception: | CODE |
| LOW | modules/processors/frame/_onnx_enhancer.py | 110 | except Exception: | CODE |
| LOW | modules/processors/frame/_onnx_enhancer.py | 136 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_masking.py | 411 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_masking.py | 503 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_masking.py | 543 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_enhancer_gpen256.py | 73 | except Exception as e: | CODE |
| LOW | modules/processors/frame/face_enhancer_gpen256.py | 78 | except Exception as e: | CODE |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 563 | print(f"Error during face swap: {e}") | CODE |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 1226 | print(f"Error in create_lower_mouth_mask: {e}") # Print unexpected errors | CODE |
| MEDIUM | modules/processors/frame/face_swapper.py | 1285 | # print(f"Error drawing text for visualization: {e}") # Optional debug | COMMENT |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 1386 | print(f"Error applying mouth area: {e}") # Optional debug | CODE |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 1465 | print(f"Error creating convex hull for face mask: {hull_e}") | CODE |
| MEDIUM | modules/processors/frame/face_swapper.py | 1272 | print(f"Error drawing polygon for visualization: {e}") # Optional debug | CODE |
| MEDIUM | modules/processors/frame/face_swapper.py | 1482 | print(f"Error creating face mask: {e}") # Print unexpected errors | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 562 | except Exception as e: | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 1225 | except Exception as e: | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 1385 | except Exception as e: | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 1464 | except Exception as hull_e: | CODE |
| LOW | modules/processors/frame/face_swapper.py | 123 | except Exception: | CODE |
| LOW | modules/processors/frame/face_swapper.py | 173 | except Exception: | CODE |
| 16 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tkinter_fix.py | 8 | # Create a monkey patch for the internal _tkinter module | COMMENT |
| MEDIUM | tkinter_fix.py | 15 | # Define the missing ::tk::ScreenChanged procedure | COMMENT |
| MEDIUM | modules/tkinter_fix.py | 5 | # Create a monkey patch for the internal _tkinter module | COMMENT |
| MEDIUM | modules/tkinter_fix.py | 12 | # Define the missing ::tk::ScreenChanged procedure | COMMENT |
| MEDIUM | modules/utilities.py | 292 | # Create a specific SSL context for macOS to avoid globally disabling verification | COMMENT |
| MEDIUM | modules/processors/frame/face_masking.py | 55 | # Create a slightly larger convex hull for padding | COMMENT |
| MEDIUM | modules/processors/frame/face_masking.py | 129 | # Create the mask | COMMENT |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 570 | # Create a mask for the target face | COMMENT |
| MEDIUM⚡ | modules/processors/frame/face_swapper.py | 573 | # Create the mouth mask using the ORIGINAL frame (before swap) for cutout | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 1194 | # Create the mask ROI | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 1319 | # Define the Region of Interest (ROI) on the target frame (swapped frame) | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 1357 | # Create a mask based on the mouth_polygon, relative to the ROI | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/face_analyser.py | 328 | CODE | |
| LOW | modules/face_analyser.py | 353 | CODE | |
| LOW | modules/ui.py | 1046 | CODE | |
| LOW | modules/utilities.py | 80 | CODE | |
| LOW | modules/utilities.py | 282 | CODE | |
| LOW | modules/video_capture.py | 36 | CODE | |
| LOW | modules/onnx_optimize.py | 217 | CODE | |
| LOW | modules/onnx_optimize.py | 355 | CODE | |
| LOW | modules/onnx_optimize.py | 439 | CODE | |
| LOW | modules/processors/frame/face_enhancer.py | 288 | CODE | |
| LOW | modules/processors/frame/core.py | 58 | CODE | |
| LOW | modules/processors/frame/core.py | 84 | CODE | |
| LOW | modules/processors/frame/core.py | 118 | CODE | |
| LOW | modules/processors/frame/core.py | 258 | CODE | |
| LOW | modules/processors/frame/_onnx_enhancer.py | 24 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 68 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 228 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 735 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 772 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 901 | CODE | |
| LOW | modules/processors/frame/face_swapper.py | 1018 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_face_analyser_get_one_face.py | 59 | def test_uses_supplied_detected_faces_without_reanalysing_frame(self): | CODE |
| LOW | tests/test_face_analyser_get_one_face.py | 71 | def test_supplied_empty_detected_faces_returns_none(self): | CODE |
| LOW | tests/test_face_analyser_get_one_face.py | 81 | def test_without_supplied_faces_preserves_existing_detection_path(self): | CODE |
| LOW | modules/face_analyser.py | 254 | def get_unique_faces_from_target_image() -> Any: | CODE |
| LOW | modules/face_analyser.py | 277 | def get_unique_faces_from_target_video() -> Any: | CODE |
| LOW | modules/core.py | 119 | def encode_execution_providers(execution_providers: List[str]) -> List[str]: | CODE |
| LOW | modules/core.py | 123 | def decode_execution_providers(execution_providers: List[str]) -> List[str]: | CODE |
| LOW⚡ | modules/core.py | 134 | def suggest_default_execution_provider() -> str: | CODE |
| LOW⚡ | modules/core.py | 143 | def suggest_execution_providers() -> List[str]: | CODE |
| LOW⚡ | modules/core.py | 147 | def suggest_execution_threads() -> int: | CODE |
| LOW | modules/processors/frame/core.py | 32 | def load_frame_processor_module(frame_processor: str) -> Any: | CODE |
| LOW⚡ | modules/processors/frame/core.py | 48 | def get_frame_processors_modules(frame_processors: List[str]) -> List[ModuleType]: | CODE |
| LOW⚡ | modules/processors/frame/core.py | 58 | def set_frame_processors_modules_from_ui(frame_processors: List[str]) -> None: | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 1235 | def draw_mouth_mask_visualization( | CODE |
| LOW | modules/processors/frame/face_swapper.py | 429 | def _cuda_graph_swap_inference(blob: np.ndarray, latent: np.ndarray) -> np.ndarray: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | modules/processors/frame/face_swapper.py | 569 | if mouth_mask_enabled: # Check if mouth_mask is enabled | CODE |
| LOW | modules/processors/frame/face_swapper.py | 791 | # Check if target is a file path (image or video) or live stream | COMMENT |
| LOW⚡ | modules/processors/frame/face_swapper.py | 803 | if target_info: # Check if target info exists | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 810 | if target_frames_data: # Check if frame data exists | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 814 | if faces_in_frame: # Check if faces exist | CODE |
| LOW | modules/processors/frame/face_swapper.py | 985 | # Check if processing actually returned a frame | COMMENT |
| LOW | modules/processors/frame/face_swapper.py | 1246 | # Check if polygon is valid for drawing | COMMENT |
| LOW | modules/processors/frame/face_swapper.py | 1342 | # Check if mouth_cutout has valid dimensions before resizing | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/ui.py | 371 | def update_status(text: str) -> None: | CODE |
| LOW | modules/ui.py | 727 | def set_status(self, text: str) -> None: | CODE |
| LOW | modules/ui.py | 943 | def _update_tumbler(var: str, value: bool) -> None: | CODE |
| LOW | modules/ui.py | 1293 | def set_status(self, text: str) -> None: | CODE |
| LOW | modules/ui.py | 1393 | def set_status(self, text: str) -> None: | CODE |
| LOW | modules/core.py | 198 | def update_status(message: str, scope: str = 'DLC.CORE') -> None: | CODE |
| LOW | modules/video_capture.py | 157 | def set_frame_callback(self, callback: Callable[[np.ndarray], None]) -> None: | CODE |
| LOW⚡ | modules/processors/frame/core.py | 58 | def set_frame_processors_modules_from_ui(frame_processors: List[str]) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | modules/processors/frame/face_swapper.py | 1459 | # Fallback: use bounding box of landmarks? Or just return empty mask? | COMMENT |
| MEDIUM | modules/processors/frame/face_swapper.py | 124 | pass # fall through to the robust bbox-ellipse path below | CODE |
| LOW⚡ | modules/processors/frame/face_swapper.py | 1389 | pass # Don't crash, just return the frame as is | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/gpu_processing.py | 21 | import os | COMMENT |
| LOW | modules/video_capture.py | 41 | # enumeration), so open with DSHOW first to preserve mapping. | COMMENT |
| LOW | modules/onnx_optimize.py | 421 | del graph.node[:] | COMMENT |
| LOW | modules/processors/frame/face_swapper.py | 1121 | try: # Wrap main logic in try-except | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | modules/run.py | 4 | CODE | |
| LOW | modules/ui.py | 11 | CODE | |
| LOW | modules/gpu_processing.py | 19 | CODE | |
| LOW | modules/platform_info.py | 10 | CODE |