A Lightweight Face Recognition and Facial Attribute Analysis (Age, Gender, Emotion and Race) Library for Python
191 matches across 8 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | deepface/DeepFace.py | 37 | # ----------------------------------- |
| MEDIUM | deepface/DeepFace.py | 48 | # ----------------------------------- |
| MEDIUM | deepface/models/facial_recognition/Facenet.py | 14 | # -------------------------------- |
| MEDIUM | deepface/models/facial_recognition/Facenet.py | 56 | # -------------------------------- |
| MEDIUM | deepface/models/facial_recognition/VGGFace.py | 15 | # --------------------------------------- |
| MEDIUM | deepface/models/facial_recognition/VGGFace.py | 39 | # --------------------------------------- |
| MEDIUM | deepface/models/facial_recognition/DeepID.py | 88 | # --------------------------------- |
| MEDIUM | deepface/models/facial_recognition/FbDeepFace.py | 8 | # -------------------------------- |
| MEDIUM | deepface/models/facial_recognition/FbDeepFace.py | 84 | # --------------------------------- |
| MEDIUM | deepface/models/facial_recognition/ArcFace.py | 14 | # -------------------------------- |
| MEDIUM | deepface/models/facial_recognition/ArcFace.py | 86 | # --------------------------------------- |
| MEDIUM | deepface/models/facial_recognition/ArcFace.py | 92 | # --------------------------------------- |
| MEDIUM | deepface/models/facial_recognition/OpenFace.py | 31 | # --------------------------------------- |
| MEDIUM | deepface/models/facial_recognition/OpenFace.py | 387 | # ----------------------------------- |
| MEDIUM | deepface/models/facial_recognition/OpenFace.py | 395 | # ----------------------------------- |
| MEDIUM | deepface/models/demography/Age.py | 79 | # -------------------------- |
| MEDIUM | deepface/models/demography/Age.py | 87 | # -------------------------- |
| MEDIUM | deepface/models/demography/Age.py | 91 | # -------------------------- |
| MEDIUM | deepface/models/demography/Gender.py | 16 | # ------------------------------------- |
| MEDIUM | deepface/models/demography/Gender.py | 18 | # ------------------------------------- |
| MEDIUM | deepface/models/demography/Gender.py | 77 | # -------------------------- |
| MEDIUM | deepface/models/demography/Gender.py | 85 | # -------------------------- |
| MEDIUM | deepface/models/demography/Gender.py | 89 | # -------------------------- |
| MEDIUM | deepface/models/demography/Race.py | 73 | # -------------------------- |
| MEDIUM | deepface/models/demography/Race.py | 81 | # -------------------------- |
| MEDIUM | deepface/models/demography/Race.py | 85 | # -------------------------- |
| MEDIUM | deepface/models/demography/Emotion.py | 121 | # ---------------------------- |
| MEDIUM | deepface/models/face_detection/OpenCv.py | 107 | # ---------------------------------------------------------------- |
| MEDIUM | deepface/models/face_detection/OpenCv.py | 117 | # ---------------------------------------------------------------- |
| MEDIUM | deepface/models/face_detection/OpenCv.py | 131 | # ----------------------- |
| MEDIUM | deepface/modules/recognition.py | 283 | # ---------------------------- |
| MEDIUM | deepface/modules/recognition.py | 387 | # --------------------------- |
| MEDIUM | deepface/modules/recognition.py | 405 | # ----------------------------------- |
| MEDIUM | deepface/modules/representation.py | 154 | # --------------------------------- |
| MEDIUM | deepface/modules/demography.py | 148 | # --------------------------------- |
| MEDIUM | deepface/modules/demography.py | 235 | # ----------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 14 | # ---------------------------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 25 | # ---------------------------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 41 | # ---------------------------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 60 | # ---------------------------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 76 | # ---------------------------------------------- |
| MEDIUM | tests/unit/face-recognition-how.py | 107 | # ---------------------------------------------- |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deepface/commons/image_utils.py | 135 | def load_image_from_io_object(obj: IO[bytes]) -> NDArray[Any]: |
| LOW | deepface/commons/image_utils.py | 191 | def load_image_from_file_storage(file: FileStorage) -> NDArray[Any]: |
| LOW | deepface/commons/weight_utils.py | 29 | def download_weights_if_necessary( |
| LOW | deepface/commons/weight_utils.py | 104 | def download_all_models_in_one_shot() -> None: |
| LOW | deepface/models/Demography.py | 58 | def _preprocess_batch_or_single_input( |
| LOW | deepface/api/src/modules/core/routes.py | 29 | def extract_image_from_request(img_key: str) -> Union[str, NDArray[Any]]: |
| LOW | deepface/modules/verification.py | 133 | def extract_embeddings_and_facial_areas( |
| LOW | deepface/modules/verification.py | 243 | def __extract_faces_and_embeddings( |
| LOW | deepface/modules/streaming.py | 226 | def build_facial_recognition_model(model_name: str) -> None: |
| LOW | deepface/modules/streaming.py | 504 | def perform_facial_recognition( |
| LOW | deepface/modules/streaming.py | 561 | def perform_demography_analysis( |
| LOW | deepface/modules/normalization.py | 12 | def normalize_embedding_minmax( |
| LOW | tests/unit/test_find_batched.py | 18 | def test_find_with_exact_path(): |
| LOW | tests/unit/test_find_batched.py | 57 | def test_batched_find_with_similarity_search(): |
| LOW | tests/unit/test_find_batched.py | 103 | def test_find_with_array_input(): |
| LOW | tests/unit/test_find_batched.py | 126 | def test_find_with_extracted_faces(): |
| LOW | tests/unit/test_singleton.py | 6 | def test_singleton_same_object(): |
| LOW | tests/unit/test_encrypt.py | 76 | def test_encrypt_single_skip_case(): |
| LOW | tests/unit/test_encrypt.py | 121 | def test_encrypt_batch_skip_case(): |
| LOW | tests/unit/test_encrypt.py | 176 | def test_homomorphic_encryption(): |
| LOW | tests/unit/test_verify.py | 17 | def test_different_facial_recognition_models(): |
| LOW | tests/unit/test_verify.py | 76 | def test_different_face_detectors(): |
| LOW | tests/unit/test_verify.py | 112 | def test_verify_for_preloaded_image(): |
| LOW | tests/unit/test_verify.py | 120 | def test_verify_for_precalculated_embeddings(): |
| LOW | tests/unit/test_verify.py | 159 | def test_verify_with_precalculated_embeddings_for_incorrect_model(): |
| LOW | tests/unit/test_verify.py | 177 | def test_verify_for_broken_embeddings(): |
| LOW | tests/unit/test_verify.py | 189 | def test_verify_for_nested_embeddings(): |
| LOW | tests/unit/test_verify.py | 205 | def test_compability_of_verify_and_represent(): |
| LOW | tests/unit/test_output_normalization.py | 10 | def test_minmax_normalization(): |
| LOW | tests/unit/test_output_normalization.py | 33 | def test_minmax_normalization_batch(): |
| LOW | tests/unit/test_output_normalization.py | 50 | def test_minmax_normalization_edge_values(): |
| LOW | tests/unit/test_enforce_detection.py | 12 | def test_enabled_enforce_detection_for_non_facial_input(): |
| LOW | tests/unit/test_enforce_detection.py | 24 | def test_disabled_enforce_detection_for_non_facial_input_on_represent(): |
| LOW | tests/unit/test_enforce_detection.py | 44 | def test_disabled_enforce_detection_for_non_facial_input_on_verify(): |
| LOW | tests/unit/test_signature.py | 42 | def test_sign_and_verify_happy_path_with_obj(self): |
| LOW | tests/unit/test_signature.py | 66 | def test_sign_and_verify_happy_path_with_dict(self): |
| LOW | tests/unit/test_signature.py | 83 | def test_missing_algorithm_in_dict(self): |
| LOW | tests/unit/test_signature.py | 99 | def test_tampered_datastore_detection_with_type_error(self): |
| LOW | tests/unit/test_signature.py | 121 | def test_tampered_datastore_detection_with_content(self): |
| LOW | tests/unit/test_signature.py | 166 | def test_unsigned_datastore_detected(self): |
| LOW | tests/unit/test_signature.py | 184 | def test_signed_datastore_with_no_credentials(self): |
| LOW | tests/unit/test_signature.py | 241 | def __flush_datastore_and_signature(self): |
| LOW | tests/unit/test_find.py | 20 | def test_find_with_exact_path(): |
| LOW | tests/unit/test_find.py | 49 | def test_find_with_array_input(): |
| LOW | tests/unit/test_find.py | 71 | def test_find_with_extracted_faces(): |
| LOW | tests/unit/test_find.py | 106 | def test_filetype_for_find_bulk_embeddings(): |
| LOW | tests/unit/test_find.py | 126 | def test_find_without_refresh_database(): |
| LOW | tests/unit/test_find.py | 176 | def test_find_for_similarity_search(): |
| LOW | tests/unit/test_landmark_sanitization.py | 42 | def test_extract_faces_sanitizes_landmarks(monkeypatch): |
| LOW | tests/unit/test_commons.py | 32 | def test_loading_broken_weights(): |
| LOW | tests/unit/test_commons.py | 64 | def test_download_weights_for_available_file( |
| LOW | tests/unit/test_commons.py | 91 | def test_download_weights_if_necessary_gdown_failure( |
| LOW | tests/unit/test_commons.py | 120 | def test_download_weights_if_necessary_no_compression( |
| LOW | tests/unit/test_commons.py | 155 | def test_download_weights_if_necessary_zip( |
| LOW | tests/unit/test_commons.py | 245 | def test_download_weights_for_non_supported_compress_type( |
| LOW | tests/unit/test_extract_faces.py | 102 | def test_backends_for_enforced_detection_with_non_facial_inputs(): |
| LOW | tests/unit/test_extract_faces.py | 110 | def test_backends_for_not_enforced_detection_with_non_facial_inputs(): |
| LOW | tests/unit/test_extract_faces.py | 141 | def test_facial_coordinates_are_in_borders(): |
| LOW | tests/unit/test_extract_faces.py | 191 | def test_batch_ndarray_inputs(): |
| LOW | tests/unit/test_api.py | 182 | def test_analyze_inputformats(self): |
| 31 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deepface/commons/weight_utils.py | 60 | except Exception as err: |
| LOW | deepface/commons/weight_utils.py | 93 | except Exception as err: |
| LOW | deepface/commons/logger.py | 30 | except Exception as err: |
| LOW | deepface/models/facial_recognition/SFace.py | 79 | except Exception as err: |
| LOW | deepface/models/facial_recognition/Buffalo_L.py | 29 | except Exception as err: |
| LOW | deepface/models/face_detection/Ssd.py | 48 | except Exception as err: |
| LOW | deepface/models/face_detection/YuNet.py | 52 | except Exception as err: |
| LOW | deepface/models/spoofing/FasNet.py | 32 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 40 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 69 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 97 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 136 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 183 | except Exception as err: |
| LOW | deepface/api/src/modules/core/service.py | 208 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 89 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 122 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 127 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 159 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 211 | except Exception as err: |
| LOW | deepface/api/src/modules/core/routes.py | 257 | except Exception as err: |
| LOW | deepface/modules/streaming.py | 863 | except Exception as err: # pylint: disable=broad-except |
| LOW | deepface/modules/database/neo4j.py | 327 | except Exception as e: # pylint: disable=broad-except |
| LOW | deepface/modules/database/pgvector.py | 77 | except Exception as e: |
| LOW | deepface/modules/database/pgvector.py | 148 | except Exception as e: # pylint: disable=broad-except |
| LOW | deepface/modules/database/pgvector.py | 156 | except Exception as e: |
| LOW | deepface/modules/database/postgres.py | 113 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deepface/commons/image_utils.py | 25 | |
| LOW | deepface/commons/image_utils.py | 44 | |
| LOW | deepface/commons/weight_utils.py | 104 | |
| LOW | deepface/modules/recognition.py | 796 | |
| LOW | deepface/modules/detection.py | 47 | |
| LOW | deepface/modules/verification.py | 433 | |
| LOW | deepface/modules/preprocessing.py | 20 | |
| LOW | deepface/modules/streaming.py | 28 | |
| LOW | deepface/modules/streaming.py | 612 | |
| LOW | deepface/modules/streaming.py | 868 | |
| LOW | deepface/modules/datastore.py | 139 | |
| LOW | deepface/modules/demography.py | 16 | |
| LOW | deepface/modules/database/pgvector.py | 89 | |
| LOW | tests/unit/test_verify.py | 17 | |
| LOW | tests/unit/test_signature.py | 121 | |
| LOW | tests/unit/test_analyze.py | 119 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | deepface/models/facial_recognition/GhostFaceNet.py | 0 | refactored from github.com/hamadya/ghostfacenets/blob/main/backbones/ghost_model.py |
| HIGH | deepface/models/facial_recognition/GhostFaceNet.py | 0 | refactored from github.com/hamadya/ghostfacenets/blob/main/backbones/ghost_model.py |
| HIGH | deepface/models/facial_recognition/GhostFaceNet.py | 0 | refactored from github.com/hamadya/ghostfacenets/blob/main/backbones/ghost_model.py |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deepface/models/Demography.py | 46 | if not self.model_name: # Check if called from derived class |
| LOW | deepface/api/src/modules/core/routes.py | 42 | # Check if the request is multipart/form-data (file input) |
| LOW | deepface/api/src/modules/core/routes.py | 57 | # Check if the request is coming as base64, file path or url from json or form data |
| LOW | deepface/modules/database/weaviate.py | 150 | # Check if embedding already exists |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | deepface/DeepFace.py | 33 | |
| LOW | deepface/modules/modeling.py | 1 | |
| LOW | deepface/modules/database/inventory.py | 5 | |
| LOW | tests/unit/test_landmark_sanitization.py | 2 | |
| LOW | tests/integration/test_postgres_search.py | 3 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | tests/unit/stream.py | 1 | from deepface import DeepFace |
| LOW | scripts/dockerize.sh | 1 | # Dockerfile is in the root |
| LOW | scripts/dockerize.sh | 41 | # to access the inside of docker image when it is in running status |
| LOW | .github/workflows/tests.yml | 1 | name: Tests |