Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
A super fast face detector packaged by the libfacedetection repository using pybind11.
[2023-5-8] Project init.
pip install yuface
# opencv
import cv2
img = cv2.imread('xxx.jpg')
# PIL
import PIL
import numpy as np
img = PIL.Image.open('xxx.jpg').convert('RGB')
img = np.array(img) # convert to numpy array
img = img[:, :, ::-1] # convert to BGR
# imageio
import imageio as io
img = io.imread('xxx.jpg')
img = img[:, :, ::-1] # convert to BGR
# img: numpy.ndarray, shape=(H, W, 3), dtype=uint8, BGR
# conf_thresh: float, confidence threshold, default=0.5, range=[0.0, 0.1]
from yuface import detect
confs, bboxes, landmarks = detect(img, conf_thresh=0.5)
# confs: numpy.ndarray, shape=(N,), dtype=uint16, confidence
# bboxes: numpy.ndarray, shape=(N, 4), dtype=uint16, bounding box (XYWH)
# landmarks: numpy.ndarray, shape=(N, 10), dtype=uint16, landmarks (XYXYXYXYXY)
import cv2
for conf, bbox, landmark in zip(confs, bboxes, landmarks):
cv2.rectangle(img, (bbox[0], bbox[1]), (bbox[0] + bbox[2], bbox[1] + bbox[3]), (0, 255, 0), 1)
cv2.putText(img, str(conf), (bbox[0], bbox[1]), cv2.FONT_HERSHEY_SIMPLEX, 0.5, (0, 0, 255), 1)
for i in range(5):
cv2.circle(img, (landmark[2*i], landmark[2*i+1]), 2, (0, 255, 0), 1)
cv2.imwrite('result.jpg', img)
FAQs
A face detection library based on libfacedetection
We found that yuface 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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.