Repository Analysis

ageitgey/face_recognition

The world's simplest facial recognition api for Python and the command line

23.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ageitgey/face_recognition, a Python project with 56,578 GitHub stars. SynthScan v2.0 examined 4,699 lines of code across 44 source files, recording 78 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 23.3 places this repository in the Moderate 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).

23.3
Adjusted Score
23.3
Raw Score
100%
Time Factor
2026-06-25
Last Push
56.6K
Stars
Python
Language
4.7K
Lines of Code
44
Files
78
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 11LOW 67

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 78 distinct pattern matches across 9 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.

Self-Referential Comments11 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUMdocs/conf.py7# This file is execfile()d with the current directory set to itsCOMMENT
MEDIUMexamples/facerec_from_webcam_faster.py35# Initialize some variablesCOMMENT
MEDIUMexamples/blur_faces_on_webcam.py13# Initialize some variablesCOMMENT
MEDIUMexamples/identify_and_draw_boxes_on_faces.py36# Create a Pillow ImageDraw Draw instance to draw withCOMMENT
MEDIUMexamples/facerec_from_webcam_multiprocessing.py143 # Create a thread to capture frames (if uses subprocess, it will crash on Mac)COMMENT
MEDIUMexamples/facerec_from_video_file.py14# Create an output movie file (make sure resolution/frame rate matches input video!)COMMENT
MEDIUMexamples/facerec_from_video_file.py30# Initialize some variablesCOMMENT
MEDIUMexamples/find_faces_in_picture.py8# This method is fairly accurate, but not as accurate as the CNN model and not GPU accelerated.COMMENT
MEDIUMexamples/facerec_on_raspberry_pi.py25# Initialize some variablesCOMMENT
MEDIUMexamples/find_faces_in_picture_cnn.py8# This method is more accurate than the default HOG model, but it's slowerCOMMENT
MEDIUMexamples/find_facial_features_in_picture.py12# Create a PIL imagedraw object so we can draw on the pictureCOMMENT
Hyper-Verbose Identifiers24 hits · 26 pts
SeverityFileLineSnippetContext
LOWface_recognition/api.py124def _raw_face_locations_batched(images, number_of_times_to_upsample=1, batch_size=128):CODE
LOWface_recognition/api.py146 def convert_cnn_detections_to_css(detections):CODE
LOWface_recognition/face_detection_cli.py29def process_images_in_process_pool(images_to_check, number_of_cpus, model, upsample):CODE
LOWface_recognition/face_recognition_cli.py71def process_images_in_process_pool(images_to_check, known_names, known_face_encodings, number_of_cpus, tolerance, show_dCODE
LOWtests/test_face_recognition.py40 def test_cnn_raw_face_locations(self):CODE
LOWtests/test_face_recognition.py81 def test_partial_face_locations(self):CODE
LOWtests/test_face_recognition.py94 def test_raw_face_locations_batched(self):CODE
LOWtests/test_face_recognition.py104 def test_batched_face_locations(self):CODE
LOWtests/test_face_recognition.py139 def test_face_landmarks_small_model(self):CODE
LOWtests/test_face_recognition.py155 def test_face_encodings_large_model(self):CODE
LOWtests/test_face_recognition.py188 def test_face_distance_empty_lists(self):CODE
LOWtests/test_face_recognition.py230 def test_compare_faces_empty_lists(self):CODE
LOWtests/test_face_recognition.py248 def test_command_line_interface_options(self):CODE
LOWtests/test_face_recognition.py255 def test_command_line_interface(self):CODE
LOWtests/test_face_recognition.py266 def test_command_line_interface_big_image(self):CODE
LOWtests/test_face_recognition.py277 def test_command_line_interface_tolerance(self):CODE
LOWtests/test_face_recognition.py288 def test_command_line_interface_show_distance(self):CODE
LOWtests/test_face_recognition.py299 def test_fd_command_line_interface_options(self):CODE
LOWtests/test_face_recognition.py306 def test_fd_command_line_interface(self):CODE
LOWtests/test_face_recognition.py316 def test_fd_command_line_interface_folder(self):CODE
LOWtests/test_face_recognition.py328 def test_fd_command_line_interface_hog_model(self):CODE
LOWtests/test_face_recognition.py337 def test_fd_command_line_interface_cnn_model(self):CODE
LOWexamples/face_recognition_knn.py153def show_prediction_labels_on_image(img_path, predictions):CODE
LOWexamples/facerec_ipcamera_knn.py153def show_prediction_labels_on_image(frame, predictions):CODE
Redundant / Tautological Comments11 hits · 16 pts
SeverityFileLineSnippetContext
LOWexamples/web_service_example.py35 # Check if a valid image file was uploadedCOMMENT
LOWexamples/facerec_from_webcam.py70 # Display the resulting imageCOMMENT
LOWexamples/facerec_from_webcam_faster.py79 # Display the resultsCOMMENT
LOWexamples/facerec_from_webcam_faster.py95 # Display the resulting imageCOMMENT
LOWexamples/face_recognition_knn.py180 # Display the resulting imageCOMMENT
LOWexamples/face_recognition_knn.py201 # Print results on the consoleCOMMENT
LOWexamples/face_recognition_knn.py205 # Display results overlaid on an imageCOMMENT
LOWexamples/blur_faces_on_webcam.py26 # Display the resultsCOMMENT
LOWexamples/blur_faces_on_webcam.py43 # Display the resulting imageCOMMENT
LOWexamples/identify_and_draw_boxes_on_faces.py69# Display the resulting imageCOMMENT
LOWexamples/facerec_from_webcam_multiprocessing.py201 # Display the resulting imageCOMMENT
Over-Commented Block13 hits · 13 pts
SeverityFileLineSnippetContext
LOWdocs/conf.py1#!/usr/bin/env pythonCOMMENT
LOWdocs/conf.py61#source_encoding = 'utf-8-sig'COMMENT
LOWdocs/conf.py81#language = NoneCOMMENT
LOWdocs/conf.py101# unit titles (such as .. function::).COMMENT
LOWdocs/conf.py121# The theme to use for HTML and HTML Help pages. See the documentation forCOMMENT
LOWdocs/conf.py141# The name of an image file (relative to this directory) to place at theCOMMENT
LOWdocs/conf.py161# typographically correct entities.COMMENT
LOWdocs/conf.py181#html_show_sourcelink = TrueCOMMENT
LOWdocs/conf.py221 u'Face Recognition Documentation',COMMENT
LOWdocs/conf.py281#texinfo_show_urls = 'footnote'COMMENT
LOWexamples/web_service_example_Simplified_Chinese.py1# 这是一个非常简单的使用Web服务上传图片运行人脸识别的案例,后端服务器会识别这张图片是不是奥巴马,并把识别结果以json键值对输出COMMENT
LOWexamples/web_service_example.py1# This is a _very simple_ example of a web service that recognizes faces in uploaded images.COMMENT
LOWexamples/find_faces_in_batches.py1import face_recognitionCOMMENT
Unused Imports10 hits · 10 pts
SeverityFileLineSnippetContext
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/__init__.py7CODE
LOWface_recognition/face_detection_cli.py2CODE
LOWface_recognition/face_recognition_cli.py2CODE
LOWexamples/blink_detection.py16CODE
AI Slop Vocabulary4 hits · 6 pts
SeverityFileLineSnippetContext
LOWexamples/facerec_from_webcam.py51 # If a match was found in known_face_encodings, just use the first one.COMMENT
LOWexamples/facerec_from_webcam_faster.py63 # # If a match was found in known_face_encodings, just use the first one.COMMENT
LOWexamples/identify_and_draw_boxes_on_faces.py46 # If a match was found in known_face_encodings, just use the first one.COMMENT
LOWexamples/facerec_from_webcam_multiprocessing.py94 # If a match was found in known_face_encodings, just use the first one.COMMENT
Deep Nesting3 hits · 3 pts
SeverityFileLineSnippetContext
LOWexamples/face_recognition_knn.py46CODE
LOWexamples/facerec_ipcamera_knn.py51CODE
LOWexamples/blink_detection.py21CODE
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWexamples/facerec_on_raspberry_pi.py14# If this fails, make sure you have a camera connected to the RPi and that youCOMMENT
Excessive Try-Catch Wrapping1 hit · 1 pts
SeverityFileLineSnippetContext
LOWface_recognition/api.py10except Exception:CODE