Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
largest-frontal-face-detector
Advanced tools
The Largest Face Detector is a basic face detector that detects largest frontal face from image using external python dlib library (http://dlib.net/python/index.html).
You can install the Largest Face Detector from PyPI:
pip install largest-frontal-face-detector
The reader is supported on Python 3.6 and above.
1. numpy (pip install numpy)
2. dlib (pip install dlib)
3. PIL (pip install pillow)
NOTE :: These dependency packages will be installed automatically upon installing largest-face-detector package.
The Largest Face Detector is a pip package, named largest_face_detector
. To detect face in a particular image, call the function detect_largest_face
with image path as input (relative to current directory you are in)
>>> import largest_face_detector
>>> image = largest_face_detector.detect_largest_face('image.jpeg')
$ Cropped face saved successfully at : /Users/kulshd/2019-10-05T14:08:20.086934_cropped_image.jpeg
The function will return the cropped image as a 2D numpy array and also save it.
Following are some requirements and assumptions for using this package -
1. Image size must be within [1024,1024]. If it exceeds, NotImplementedError is raised.
2. If no face is detected by the package, a warning message is displayed
3. Currently following image formats are supported - [.jpeg, .jpg, .png]
You can also run test-cases to validate package functionality by downloading source .tar.gz file (https://pypi.org/project/largest-frontal-face-detector/1.0.0/#files) ,extracting and cd into folder largest_frontal_face_detector-1.0.0, and running python3 -m unittest discover -v
FAQs
Python pakage for detecting largest face in an image
We found that largest-frontal-face-detector demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.