Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Readme
Easy-to-use face detection framework, developed using pytorch-lightning.
Checkout documentation for more.
From PyPI
pip install fastface -U
From source
git clone https://github.com/borhanMorphy/fastface.git
cd fastface
pip install .
Pretrained models can be accessable via fastface.FaceDetector.from_pretrained(<name>)
Name | Architecture | Configuration | Parameters | Model Size | Link |
---|---|---|---|---|---|
lffd_original | lffd | original | 2.3M | 9mb | weights |
lffd_slim | lffd | slim | 1.5M | 6mb | weights |
Using package
import fastface as ff
import imageio
from pytorch_lightning.utilities.model_summary import ModelSummary
# load image as RGB
img = imageio.imread("<your_image_file_path>")[:,:,:3]
# build model with pretrained weights
model = ff.FaceDetector.from_pretrained("lffd_original")
# model: pl.LightningModule
# get model summary
ModelSummary(model, max_depth=1)
# set model to eval mode
model.eval()
# [optional] move model to gpu
model.to("cuda")
# model inference
preds, = model.predict(img, det_threshold=.8, iou_threshold=.4)
# preds: {
# 'boxes': [[xmin, ymin, xmax, ymax], ...],
# 'scores':[<float>, ...]
# }
Using demo.py script
python demo.py --model lffd_original --device cuda --input <your_image_file_path>
sample output;
Following results are obtained with this repository
validation set results
Name | Easy | Medium | Hard |
---|---|---|---|
lffd_original | 0.893 | 0.866 | 0.758 |
lffd_slim | 0.866 | 0.854 | 0.742 |
@inproceedings{LFFD,
title={LFFD: A Light and Fast Face Detector for Edge Devices},
author={He, Yonghao and Xu, Dezhong and Wu, Lifang and Jian, Meng and Xiang, Shiming and Pan, Chunhong},
booktitle={arXiv:1904.10633},
year={2019}
}
FAQs
A face detection framework for edge devices using pytorch lightning
We found that fastface 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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).