承接 astrotomic/php-deepface 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

astrotomic/php-deepface

Composer 安装命令:

composer require astrotomic/php-deepface

包简介

A PHP adapter for the python deepface framework.

README 文档

README

Latest Version MIT License Offset Earth Larabelles

PHP Version Symfony Version

pint Total Downloads Trees Carbon GitHub Sponsors

Welcome to PHP DeepFace, a powerful face recognition and facial attribute analysis package for PHP. With PHP DeepFace, you can effortlessly integrate cutting-edge deep learning models into your PHP applications for a wide range of face-related tasks. Here's how you can get started:

Installation

To get started, you'll need to install the deepface Python framework. You can do this using pip:

pip install deepface

Once you've installed deepface, you can then install the PHP adapter via Composer:

composer require astrotomic/php-deepface

Configuration

Configuring PHP DeepFace is a breeze. Simply instantiate the Astrotomic\DeepFace\DeepFace class, and it will automatically detect your local Python executable:

$deepface = new \Astrotomic\DeepFace\DeepFace();

If you have a specific Python version you'd like to use, you can provide the path to the Python executable as an argument:

$deepface = new \Astrotomic\DeepFace\DeepFace(
    python: '/usr/bin/python3',
);

Usage

PHP DeepFace provides a wide range of functionalities for face recognition and facial attribute analysis. Here are some key features:

Build Model

You can build a deepface face recognition or facial attribute model with ease:

$deepface->buildModel(\Astrotomic\DeepFace\Enums\FaceRecognitionModel::VGGFACE);

Face Detection

Perform face detection and alignment using this function:

$deepface->extractFaces(
  img_path: '~/test.png',
);

Face Verification

Verify whether two images belong to the same person or different persons. This function calculates the similarity between facial image vectors:

$deepface->verify(
  img1_path: '~/test.png',
  img2_path: '~/id.jpg',
);

Face Recognition

Find identities in a database by applying verification multiple times:

$deepface->find(
  img_path: '~/test.png',
  db_path: '~/db',
);

Face Embeddings

Generate vector embeddings for facial images using convolutional neural networks models:

$deepface->represent(
  img_path: '~/test.png',
);

Facial Attribute Analysis

Analyze facial attributes including age, gender, emotion, and race. This function builds convolutional neural network models to classify these attributes:

$deepface->analyze(
  img_path: '~/test.png',
);

Testing

Run tests to ensure everything is working as expected:

composer fix

Contributing

We welcome contributions! Please see our CONTRIBUTING guidelines for details. You may also want to review our CODE OF CONDUCT.

Security

If you discover any security-related issues, please follow the steps outlined in our SECURITY guidelines to report them.

Credits

License

PHP DeepFace is released under the MIT License. Please see the License File for more information.

Treeware

You're free to use this package, but if it makes it to your production environment, we kindly request that you contribute to a greener world by planting a tree. Trees play a vital role in combating climate change and preserving our environment. You can buy trees at offset.earth/treeware. Help us make a positive impact! 🌳

astrotomic/php-deepface 适用场景与选型建议

astrotomic/php-deepface 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10.08k 次下载、GitHub Stars 达 54, 最近一次更新时间为 2023 年 10 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「facial-recognition」 「face-recognition」 「openface」 「facenet」 「face-analysis」 「facial-expression-recognition」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 astrotomic/php-deepface 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 astrotomic/php-deepface 我们能提供哪些服务?
定制开发 / 二次开发

基于 astrotomic/php-deepface 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10.08k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 54
  • 点击次数: 30
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 54
  • Watchers: 3
  • Forks: 13
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-10