A toolkit for making real world machine learning and data analysis applications in C++
This report summarizes scanner evidence for davisking/dlib, a C++ project with 14,469 GitHub stars. SynthScan examined 722,390 lines of code across 1896 source files, recording 1098 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 1.7 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 1088 finding(s).
Are imports declared and package/API names verified? 8 finding(s).
Are wrappers, guards, and repeated structures necessary? 32 finding(s).
Which changes need focused human review? 1098 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 1098 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | CMakeLists.txt | 21 | # whatever you are building rather than create a standalone copy of dlib. | COMMENT |
| LOW | tools/python/src/face_recognition.cpp | 1 | // Copyright (C) 2017 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/python/src/dlib.cpp | 41 | { | COMMENT |
| LOW | tools/python/src/dlib.cpp | 61 | m.attr("DLIB_USE_CUDA") = false; | COMMENT |
| LOW | tools/python/src/simple_object_detector.h | 1 | // Copyright (C) 2014 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/python/src/object_detection.cpp | 1 | // Copyright (C) 2015 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/python/src/opaque_types.h | 1 | // Copyright (C) 2017 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | …ts_to_caffe/running_a_dlib_model_with_caffe_example.py | 1 | #!/usr/bin/env python | COMMENT |
| LOW | tools/imglab/src/flip_dataset.cpp | 1 | // Copyright (C) 2011 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/imglab/src/convert_pascal_xml.h | 1 | // Copyright (C) 2011 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/imglab/src/metadata_editor.cpp | 1 | // Copyright (C) 2011 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/imglab/src/cluster.cpp | 1 | // Copyright (C) 2015 Davis E. King (davis@dlib.net) | COMMENT |
| LOW | tools/imglab/src/main.cpp | 1 | COMMENT | |
| LOW | tools/htmlify/to_xml.cpp | 1 | COMMENT | |
| LOW | docs/docs/python/conf.py | 1 | # -*- coding: utf-8 -*- | COMMENT |
| LOW | docs/docs/python/conf.py | 41 | # The encoding of source files. | COMMENT |
| LOW | docs/docs/python/conf.py | 61 | # for a list of supported languages. | COMMENT |
| LOW | docs/docs/python/conf.py | 81 | # unit titles (such as .. function::). | COMMENT |
| LOW | docs/docs/python/conf.py | 101 | # Theme options are theme-specific and customize the look and feel of a theme | COMMENT |
| LOW | docs/docs/python/conf.py | 121 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 | COMMENT |
| LOW | docs/docs/python/conf.py | 141 | } | COMMENT |
| LOW | docs/docs/python/conf.py | 161 | COMMENT | |
| LOW | docs/docs/python/conf.py | 201 | # For "manual" documents, if this is true, then toplevel headings are parts, | COMMENT |
| LOW | examples/kcentroid_ex.cpp | 41 | COMMENT | |
| LOW | examples/dnn_dcgan_train_ex.cpp | 201 | // This part is the essence of the Generative Adversarial Networks. Until now, we have | COMMENT |
| LOW | examples/svr_ex.cpp | 81 | // -0.189201 -0.187636 | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 101 | std::vector<std::vector<mmod_rect>> boxes_train, boxes_test; | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 121 | // that are heavily overlapped by another box as ignore. We do this because we want to | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 141 | // Importantly, this means that if your training dataset contains an image with two | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 181 | COMMENT | |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 221 | // Our vehicle detection dataset has basically 3 different types of boxes. Square | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 241 | mmod_options options(boxes_train, 70, 30); | COMMENT |
| LOW | examples/dnn_mmod_train_find_cars_ex.cpp | 261 | // detection overlaps a box in the training data with ignore==true then that detection | COMMENT |
| LOW | examples/bayes_net_gui_ex.cpp | 141 | COMMENT | |
| LOW | examples/CMakeLists.txt | 1 | # | COMMENT |
| LOW | examples/CMakeLists.txt | 21 | # / ____/ __ \| \/ | \/ | ____| \ | |__ __/ ____| | | | | | | COMMENT |
| LOW | examples/CMakeLists.txt | 41 | # into your project. Note that you don't need to compile or install dlib. All | COMMENT |
| LOW | examples/CMakeLists.txt | 61 | # file, assignment_learning_ex.cpp. If your program consisted of multiple .cpp | COMMENT |
| LOW | examples/CMakeLists.txt | 81 | # if instead you had written: | COMMENT |
| LOW | examples/kkmeans_ex.cpp | 41 | // results without much fiddling. | COMMENT |
| LOW | examples/rvm_regression_ex.cpp | 41 | COMMENT | |
| LOW | examples/compress_stream_ex.cpp | 61 | // In the code below, we use the parser.print_options() method to print all our | COMMENT |
| LOW | examples/compress_stream_ex.cpp | 81 | // that shouldn't appear more than once and then I just call check_one_time_options() | COMMENT |
| LOW | examples/dnn_introduction2_ex.cpp | 21 | COMMENT | |
| LOW | examples/dnn_introduction2_ex.cpp | 241 | layer<tag1>(pnet); | COMMENT |
| LOW | examples/dnn_introduction2_ex.cpp | 261 | // momentum parameters. | COMMENT |
| LOW | examples/dnn_introduction2_ex.cpp | 301 | auto idx = rnd.get_random_32bit_number()%training_images.size(); | COMMENT |
| LOW | examples/bsp_ex.cpp | 121 | COMMENT | |
| LOW | examples/bsp_ex.cpp | 161 | { | COMMENT |
| LOW | examples/bsp_ex.cpp | 181 | COMMENT | |
| LOW | examples/bsp_ex.cpp | 221 | } | COMMENT |
| LOW | examples/bsp_ex.cpp | 241 | // terminate. That is, we know it is time to terminate if all the messages between | COMMENT |
| LOW | examples/dnn_mmod_find_cars_ex.cpp | 81 | COMMENT | |
| LOW | examples/svm_pegasos_ex.cpp | 41 | // This is a typedef for the type of kernel we are going to use in this example. | COMMENT |
| LOW | examples/svm_pegasos_ex.cpp | 121 | // with the pegasos algorithm. But it is often the case that you have a dataset and you | COMMENT |
| LOW | examples/model_selection_ex.cpp | 81 | // binary SVM with the RBF kernel to classify the data. However, there are | COMMENT |
| LOW | examples/object_detector_ex.cpp | 181 | // the feature vectors output by the hashed_feature_image will have dimension pow(2,10). | COMMENT |
| LOW | examples/object_detector_ex.cpp | 201 | // the details into the scanner object we are ready to use the structural_object_detection_trainer | COMMENT |
| LOW | examples/krls_filter_ex.cpp | 41 | typedef radial_basis_kernel<sample_type> kernel_type; | COMMENT |
| LOW | examples/gui_api_ex.cpp | 221 | // would see a black console window pop up when you ran it. The following | COMMENT |
| 944 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dlib/global_optimization/find_max_global.h | 49 | // So we write the terrible garbage in the #else for visual studio. When Visual Studio supports C++11 I'll upda | COMMENT |
| HIGH | python_examples/sequence_segmenter.py | 134 | # sparse or dense representation depending on our needs. In this example, we | COMMENT |
| HIGH | python_examples/svm_binary_classifier.py | 6 | # the dlib C++ Library. In this example, we will create a simple test dataset | COMMENT |
| HIGH | python_examples/face_clustering.py | 7 | # In this example, we assume the largest cluster will contain photos of the common person in the | COMMENT |
| HIGH | python_examples/svm_rank.py | 10 | # In this example, we will create a simple test dataset and show how to learn a | COMMENT |
| HIGH | python_examples/svm_struct.py | 35 | # In this example, we have three types of samples: class 0, 1, or 2. That | COMMENT |
| HIGH | python_examples/train_object_detector.py | 34 | # In this example we are going to train a face detector based on the small | COMMENT |
| HIGH | python_examples/train_object_detector.py | 127 | # In this example we load detector.svm again since it's the only one we have on | COMMENT |
| HIGH | python_examples/train_shape_predictor.py | 42 | # In this example we are going to train a face detector based on the small | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/docs/index.xml | 174 | <li>A simple <a href="network.html#server_http">HTTP server</a> object you can use to embed a | CODE |
| MEDIUM | docs/docs/linear_algebra.xml | 1346 | <a href="#point">point</a>. Note that you can use <a href="#find_affine_transform">find_affine_transform</a | CODE |
| MEDIUM | docs/docs/linear_algebra.xml | 1429 | <a href="#point">point</a>. Note that you can use <a href="#find_projective_transform">find_projective_tran | CODE |
| MEDIUM | examples/matrix_expressions_ex.cpp | 176 | As discussed above, constructing this object doesn't compute anything. It just | CODE |
| LOW | dlib/xml_parser/xml_parser_kernel_1.h | 578 | // don't forget to rethrow the exception | COMMENT |
| LOW | dlib/optimization/elastic_net.h | 204 | // Do the base dot product but don't forget to add in the -(1/t)*y part from the svm reduction paper | COMMENT |
| LOW | dlib/optimization/optimization_solve_qp_using_smo.h | 698 | // Don't forget to include the Q_offdiag terms in the computation. Note that | COMMENT |
| LOW | dlib/optimization/optimization.h | 266 | // Don't forget to negate these outputs from the line search since they are | COMMENT |
| LOW | dlib/optimization/optimization.h | 668 | // Don't forget to negate the output from the line search since it is from the | COMMENT |
| LOW | dlib/random_forest/random_forest_regression.h | 478 | // Add to leaves. Don't forget to set the pointer in the | COMMENT |
| LOW | dlib/random_forest/random_forest_regression.h | 502 | // Add to leaves. Don't forget to set the pointer in the | COMMENT |
| MEDIUM | dlib/svm/roc_trainer_abstract.h | 83 | as discussed above, and finally returns the decision function. | CODE |
| LOW | dlib/svm/feature_ranking.h | 331 | // we are doing the optimization in log space so don't forget to convert back to normal space | COMMENT |
| LOW | dlib/gui_core/gui_core_kernel_2.h | 12 | #error "Also make sure you have libx11-dev installed on your system" | COMMENT |
| LOW | dlib/control/mpc.h | 356 | // If this is the last SMO iteration then don't forget to initialize v | COMMENT |
| MEDIUM | python_examples/sequence_segmenter.py | 63 | # you can use "unsorted" sparse vectors. This means you can add the index/value | COMMENT |
| MEDIUM | python_examples/sequence_segmenter.py | 133 | # convert them into arrays of vectors as discussed above. We can use either a | COMMENT |
| MEDIUM | python_examples/svm_rank.py | 133 | # you can use the dlib.make_sparse_vector() routine to make a sparse vector | COMMENT |
| MEDIUM⚡ | python_examples/svm_struct.py | 241 | # Create a dense vector object (note that you can also use unsorted | COMMENT |
| MEDIUM | python_examples/train_object_detector.py | 4 | # This example program shows how you can use dlib to make a HOG based object | COMMENT |
| MEDIUM | python_examples/train_object_detector.py | 73 | # own XML files you can use the imglab tool which can be found in the | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 244 | def read_version_from_cmakelists(cmake_file): | STRING |
| LOW | tools/python/test/test_numpy_returns.py | 90 | def test_jitter_image_from_multiple_threads(): | CODE |
| LOW | tools/python/test/test_setup.py | 20 | def test_windows_extension_matches_python_architecture( | CODE |
| LOW⚡ | tools/python/test/test_array.py | 15 | def test_array_init_with_number(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 23 | def test_array_init_with_negative_number(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 28 | def test_array_init_with_zero(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 33 | def test_array_init_with_list(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 41 | def test_array_init_with_empty_list(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 46 | def test_array_init_without_argument(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 51 | def test_array_init_with_tuple(): | CODE |
| LOW⚡ | tools/python/test/test_array.py | 58 | def test_array_serialization_empty(): | CODE |
| LOW | tools/python/test/test_array.py | 83 | def test_array_string_representations_empty(): | CODE |
| LOW | tools/python/test/test_array.py | 89 | def test_array_string_representations(): | CODE |
| LOW | tools/python/test/test_global_optimization.py | 7 | def test_global_optimization_nargs(): | CODE |
| LOW | tools/python/test/test_global_optimization.py | 33 | def test_global_function_search(): | CODE |
| LOW | tools/python/test/test_matrix.py | 43 | def test_matrix_from_list_with_invalid_rows(): | CODE |
| LOW | tools/python/test/test_matrix.py | 50 | def test_matrix_from_list_as_column_vector(): | CODE |
| LOW | tools/python/test/test_matrix.py | 80 | def test_matrix_from_object_without_shape(): | CODE |
| LOW | tools/python/test/test_vector.py | 17 | def test_vector_init_with_number(): | CODE |
| LOW | tools/python/test/test_vector.py | 39 | def test_vector_init_with_list(): | CODE |
| LOW | tools/python/test/test_vector.py | 72 | def test_vector_invalid_getitem(): | CODE |
| LOW | tools/python/test/test_vector.py | 80 | def test_vector_init_with_negative_number(): | CODE |
| LOW | tools/python/test/test_vector.py | 94 | def test_vector_serialization(): | CODE |
| LOW | tools/python/test/test_vector.py | 119 | def test_vectors_serialization(): | CODE |
| LOW | tools/python/test/test_vector.py | 146 | def test_vectorss_serialization(): | CODE |
| LOW | tools/python/test/test_range.py | 34 | def test_range_with_negative_elements(): | CODE |
| LOW | tools/python/test/test_chinese_whispers.py | 20 | def test_chinese_whispers_with_distance(): | CODE |
| LOW | tools/python/test/test_chinese_whispers.py | 41 | def test_chinese_whispers_type_checks(): | CODE |
| LOW | python_examples/sequence_segmenter.py | 66 | def sentence_to_sparse_vectors(sentence): | CODE |
| LOW | python_examples/svm_struct.py | 270 | def get_truth_joint_feature_vector(self, idx): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 226 | # When building on travis-ci, just use 2 cores since travis-ci limits | STRING |
| MEDIUM | examples/dnn_mmod_train_find_cars_ex.cpp | 126 | // the detector works. Essentially, sliding window detectors scan all image locations | COMMENT |
| MEDIUM | examples/dnn_mmod_train_find_cars_ex.cpp | 295 | // do that. Essentially, we are setting the first argument to infinity, and only the | COMMENT |
| MEDIUM | examples/linear_manifold_regularizer_ex.cpp | 219 | // of times with different randomly chosen points so we can see how robust the result is. | COMMENT |
| MEDIUM | dlib/test/linear_manifold_regularizer.cpp | 182 | // of times with different randomly chosen points so we can see how robust the result is. | COMMENT |
| MEDIUM | dlib/timer/timer.cpp | 43 | // there is no (safe/robust)solution, but best practices are described here | COMMENT |
| MEDIUM | dlib/dnn/trainer.h | 829 | // values in previous_loss_values then we are robust to that kind | COMMENT |
| LOW⚡ | python_examples/svm_struct.py | 245 | # would simply return a dlib.sparse_vector at the end of make_psi() and | COMMENT |
| LOW | python_examples/train_object_detector.py | 76 | # file. But for this example, we just use the training.xml file included with | COMMENT |
| MEDIUM | python_examples/train_shape_predictor.py | 88 | # face landmarking datasets you will obtain state-of-the-art results, as shown | COMMENT |
| MEDIUM | python_examples/face_recognition.py | 13 | # comparable to other state-of-the-art methods for face recognition as of | COMMENT |
| LOW | python_examples/face_recognition.py | 131 | # Now we simply pass this chip (aligned image) to the api | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/docs/python/conf.py | 6 | # This file is execfile()d with the current directory set to its containing dir. | COMMENT |
| MEDIUM | python_examples/sequence_segmenter.py | 44 | # Create an empty array of vectors | COMMENT |
| MEDIUM⚡ | python_examples/svm_struct.py | 241 | # Create a dense vector object (note that you can also use unsorted | COMMENT |
| MEDIUM | python_examples/correlation_tracker.py | 43 | # Create the correlation tracker - the object needs to be initialized | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/python/test/test_numpy_returns.py | 2 | CODE | |
| LOW | tools/python/test/test_svm_c_trainer.py | 1 | CODE | |
| LOW | docs/docs/python/generate_dlib_listing.py | 1 | CODE | |
| LOW | dlib/external/pybind11/tools/libsize.py | 1 | CODE | |
| LOW | dlib/external/pybind11/tools/make_changelog.py | 7 | CODE | |
| LOW | dlib/external/pybind11/tools/make_global.py | 6 | CODE | |
| LOW | …l/pybind11/tools/codespell_ignore_lines_from_errors.py | 12 | CODE | |
| LOW | python_examples/opencv_webcam_face_detection.py | 38 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | dlib/external/pybind11/include/pybind11/detail/class.h | 662 | // Fill in all the information, and then downgrade as requested by the caller, or raise an | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | dlib/logger/logger_config_file.h | 53 | # ----------------------------------------------- | COMMENT |
| MEDIUM | dlib/logger/logger_config_file.h | 55 | # ----------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …ts_to_caffe/running_a_dlib_model_with_caffe_example.py | 70 | # Print outputs, looping over minibatch. You should see that the network | COMMENT |
| LOW⚡ | python_examples/svm_struct.py | 248 | # Set it to have 9 dimensions. Note that the elements of the vector | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.py | 48 | CODE | |
| LOW | …l/pybind11/tools/codespell_ignore_lines_from_errors.py | 17 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dlib/svm/linearly_independent_subset_finder_abstract.h | 296 | - The purpose of this function is to fill lisf with points from samples. It does | CODE |
| LOW | dlib/matrix/matrix_abstract.h | 637 | The purpose of this function is to enable you to easily initialize a matrix object. | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | dlib/external/pybind11/tools/libsize.py | 7 | # Usage: | COMMENT |