retinaface | RetinaFace : Deep Face Detection Library for Python | Computer Vision library

 by   serengil Python Version: Current License: MIT

kandi X-RAY | retinaface Summary

kandi X-RAY | retinaface Summary

retinaface is a Python library typically used in Artificial Intelligence, Computer Vision, Deep Learning, Pytorch, Tensorflow applications. retinaface has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can install using 'pip install retinaface' or download it from GitHub, PyPI.

RetinaFace is a deep learning based cutting-edge facial detector for Python coming with facial landmarks. RetinaFace is the face detection module of insightface project. The original implementation is mainly based on mxnet. Then, its tensorflow based re-implementation is published by Stanislas Bertrand. This repo is heavily inspired from the study of Stanislas Bertrand. Its source code is simplified and it is transformed to pip compatible but the main structure of the reference model and its pre-trained weights are same.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              retinaface has a low active ecosystem.
              It has 647 star(s) with 110 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 3 open issues and 44 have been closed. On average issues are closed in 11 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of retinaface is current.

            kandi-Quality Quality

              retinaface has 0 bugs and 0 code smells.

            kandi-Security Security

              retinaface has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              retinaface code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              retinaface is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              retinaface releases are not available. You will need to build from source code and install.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              It has 712 lines of code, 16 functions and 9 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed retinaface and discovered the below as its top functions. This is intended to give you an instant insight into retinaface implemented functionality, and help decide if they suit your requirements.
            • Aligns the given face in img
            • Find the euclidean distance between two representations
            • Extracts faces from an image
            • Build the model
            • Detect faces in a given image
            • Load the weights for retina
            • Load an image
            • Preprocess an image
            • Resize an image
            Get all kandi verified functions for this library.

            retinaface Key Features

            No Key Features are available at this moment for retinaface.

            retinaface Examples and Code Snippets

            RetinaFace,Installation
            Pythondot img1Lines of Code : 29dot img1License : Permissive (MIT)
            copy iconCopy
            pip install retina-face
            
            from retinaface import RetinaFace
            resp = RetinaFace.detect_faces("img1.jpg")
            
            {
                "face_1": {
                    "score": 0.9993440508842468,
                    "facial_area": [155, 81, 434, 443],
                    "landmarks": {
                      "right_eye": [2  

            Community Discussions

            QUESTION

            Can't initialize object of Detector class from py-feat
            Asked 2022-Mar-19 at 20:41

            I try to detecting FEX from videos according to this instruction: https://py-feat.org/content/detector.html#detecting-fex-from-videos

            But I can't initialize object of Detector class. Code that I use:

            ...

            ANSWER

            Answered 2022-Mar-19 at 20:41

            It looks like one of your files was corrupted.

            You can try to solve the problem by opening the directory C:\Users\User\AppData\Roaming\Python\Python39\site-packages\feat\resources\ and deleting the file ResMaskNet_Z_resmasking_dropout1_rot30.pth.

            Then run again the code and it should redownload the deleted file.

            The warning in the first two lines is just a warning, it's saying that some of the code in the library nilearn is deprecated. Most of the times you would just ignore this line, this will be probably fixed by the coders of nilearn in a future patch.

            Source https://stackoverflow.com/questions/71541634

            QUESTION

            Cropping face from image using bounding box
            Asked 2020-Sep-08 at 04:39

            This is the input frame :

            I used RetinaFace to detect all the faces and general csv files from that. This is my csv file :

            ...

            ANSWER

            Answered 2020-Sep-08 at 04:39

            I referred the retinaface code and found out that the bounding box is being extracted this way : link

            Source https://stackoverflow.com/questions/63783729

            QUESTION

            Find Eucledian distance between landmarks of faces
            Asked 2020-Sep-07 at 10:31

            I've got multiple frames and I've detected the faces in each frame using Retinaface. I would like to keep track of the faces using their landmarks.

            To find the similarity between 2 landmarks, I tried to calculate the Eucledian distance :

            Input :

            ...

            ANSWER

            Answered 2020-Sep-07 at 10:20

            It looks like you're squaring the answer twice (ans**2). But you can also simplify the function somewhat:

            Source https://stackoverflow.com/questions/63775046

            QUESTION

            Why does the parameters saved in the checkpoint are different from the ones in the fused model?
            Asked 2020-Feb-16 at 20:54

            I trained a QAT (Quantization Aware Training) based model in Pytorch, the training went on smoothly. However when I tried to load the weights into the fused model and run a test on widerface dataset I faced lots of errors:

            ...

            ANSWER

            Answered 2020-Feb-16 at 20:54

            I finally found out the cause. The error messages with the form of :

            While copying the parameter named "xxx.weight", whose dimensions in the model are torch.Size([yyy]) and whose dimensions in the checkpoint are torch.Size([yyy]).

            are actually generic messages, only returned when an exception has occured while copying the parameters in question.

            Pytorch developers could easily add the actual exception args into this spurious yet unhelpful message, so it could actually help better debug the issue at hand. Anyway, looking at the exception which was by the way :

            Source https://stackoverflow.com/questions/59941776

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install retinaface

            The easiest way to install retinaface is to download it from pypi. Face Detection - Demo. RetinaFace offers a face detection function. It expects an exact path of an image as input. Then it returns the facial area coordinates and some landmarks (eyes, nose and mouth) with a confidence score. A modern face recognition pipeline consists of 4 common stages: detect, align, represent and verify. Experiments show that alignment increases the face recognition accuracy almost 1%. Here, retinaface can find the facial landmarks including eye coordinates. In this way, it can apply alignment to detected faces with its extract faces function. Face Recognition - Demo. Notice that face recognition module of insightface project is ArcFace, and face detection module is RetinaFace. ArcFace and RetinaFace pair is wrapped in deepface framework. Consider to use deepface if you need an end-to-end face recognition pipeline. Notice that ArcFace got 99.40% accuracy on LFW data set whereas human beings just got 97.53%. Pre-trained weights of the retinaface model is going to be downloaded from Google Drive once. Download limit of my Google Drive account might be exceeded sometimes. In this case, you will have an exception like "too many users have viewed or downloaded this file recently. Please try accessing the file again later". Still, you can access the pre-trained weights on Google Drive. Please, download it here and copy to the HOME/.deepface/weights folder manually.

            Support

            There are many ways to support a project. Starring⭐️ the repo is just one🙏.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/serengil/retinaface.git

          • CLI

            gh repo clone serengil/retinaface

          • sshUrl

            git@github.com:serengil/retinaface.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link