PHPackages                             junker/php-mtcnn - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. junker/php-mtcnn

ActiveLibrary

junker/php-mtcnn
================

Implementation of the MTCNN face detector for PHP

0.1.0(4y ago)3162MITPHP

Since Aug 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Junker/PHP-MTCNN)[ Packagist](https://packagist.org/packages/junker/php-mtcnn)[ RSS](/packages/junker-php-mtcnn/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

MTCNN
=====

[](#mtcnn)

[![License](https://camo.githubusercontent.com/07a7d0169027aac6d7a0bfa8964dfef5fbc40d5a2075cabb3d8bc67e17be3451/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE) [![Minimum PHP Version](https://camo.githubusercontent.com/5c3072425e67297c8ef63d17acd2c86a0d2ef324f19249f2280bd7de902f63a2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230372e302d3838393242462e737667)](https://php.net/)

PHP-MTCNN - Implementation of the MTCNN face detector for PHP
=============================================================

[](#php-mtcnn---implementation-of-the-mtcnn-face-detector-for-php)

[![](.github/index.png)](.github/index.png)

Requirements
------------

[](#requirements)

- PHP 7.4 / 8.0
- PHP extension [php-opencv](https://github.com/php-opencv/php-opencv)

Installation
------------

[](#installation)

The best way to install PHP-MTCNN is to use a [Composer](https://getcomposer.org/download):

```
php composer.phar require junker/php-mtcnn

```

Usage
-----

[](#usage)

```
use \Junker\MTCNN\MTCNN;

$mtcnn = new MTCNN();

$factor = 0.709;
$threshold = [0.7, 0.6, 0.6];
$minSize = 12;

$image = \CV\imread($image_path, 1);
$faces = $mtcnn->detect($image, $minSize, $threshold, $factor);

foreach ($faces as $face)
{
	$x = (int) $face->bbox->xmin;
	$y = (int) $face->bbox->ymin;
	$x2 = (int) $face->bbox->xmax;
	$y2 = (int) $face->bbox->ymax;
	$score = $face->bbox->score;

	\CV\rectangle($image, $x, $y, $x2, $y2, new \CV\Scalar(255, 0, 0), 2);

	print_r($face);
}

\CV\imshow("image", $image);
\CV\waitKey(0);
```

Based on

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1739d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1144095?v=4)[Dmitry Kosenkov](/maintainers/Junker)[@Junker](https://github.com/Junker)

---

Top Contributors

[![Junker](https://avatars.githubusercontent.com/u/1144095?v=4)](https://github.com/Junker "Junker (6 commits)")

---

Tags

face detectionOpenCVMTCNNDNN

### Embed Badge

![Health badge](/badges/junker-php-mtcnn/health.svg)

```
[![Health](https://phpackages.com/badges/junker-php-mtcnn/health.svg)](https://phpackages.com/packages/junker-php-mtcnn)
```

###  Alternatives

[softon/laravel-face-detect

A Laravel Package for Face Detection and Cropping in Images.

5626.2k](/packages/softon-laravel-face-detect)[freearhey/laravel-face-detection

A Laravel Package for Face Detection and Cropping in Images.

392.2k](/packages/freearhey-laravel-face-detection)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
