PHP Classes

PHP PicPurify API: Analyze picture to detect alarming characteristics

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 163 All time: 8,933 This week: 51Up
Version License PHP version Categories
picpurify 1.0.0MIT/X Consortium ...5PHP 5, Graphics, Web services, Artifi...
Description 

Author

This package can analyze picture to detect alarming characteristics.

It can send HTTP requests to the PicPurify API to submit a picture to be analyzed to detect characteristic of the picture content that may be used to determine if the picture is suitable to be published in sites with certain rules.

Currently it can detect if pictures contain:

- Porn
- Nudity
- Gore
- Money
- Weapons
- Drugs
- Hate signs
- Obscene gestures
- QRCode
- Face
- Age of a person
- Gender of a person

Innovation Award
PHP Programming Innovation award nominee
August 2021
Number 7
Many sites accept user-contributed pictures to be published on their pages.

However, there is always the risk that some users may submit inadequate pictures.

This package helps developers detect if a picture may be of a type that is not acceptable for publication, so a human may review it later to confirm if the picture is inadequate and avoid being published.


Manuel Lemos
Picture of Isa Eken
  Performance   Level  
Name: Isa Eken <contact>
Classes: 21 packages by
Country: Turkey Turkey
Innovation award
Innovation award
Nominee: 14x

Documentation

Picpurify API

> Work in progress

Usage

$picpurify = new \IsaEken\Picpurify\Picpurify;
$picpurify
    ->setApiKey('api-key')
    ->setTasks([
        \IsaEken\Picpurify\Tasks::DrugModeration,
        \IsaEken\Picpurify\Tasks::GoreModeration,
        \IsaEken\Picpurify\Tasks::PornModeration,
    ])
    ->setImage(\IsaEken\Picpurify\Image::createFromUrl('https://example.com/example.jpg'));

$response = $picpurify->run();

$response->getStatus();
$response->getTime();
$response->getMedia();
$response->getModerations();
$response->getModeration(\IsaEken\Picpurify\Tasks::DrugModeration)->detection;
$response->getData();

License

MIT


  Files folder image Files (16)  
File Role Description
Files folder imagesrc (5 files, 2 directories)
Files folder imagetests (1 file, 1 directory)
Plain text file composer.json Data Auxiliary data
Plain text file phpunit.xml Data Auxiliary data
Plain text file README.md Doc. Documentation

  Files folder image Files (16)  /  src  
File Role Description
Files folder imageModels (3 files)
Files folder imageTraits (3 files)
  Plain text file Factory.php Class Class source
  Plain text file Image.php Class Class source
  Plain text file Picpurify.php Class Class source
  Plain text file Response.php Class Class source
  Plain text file Tasks.php Class Class source

  Files folder image Files (16)  /  src  /  Models  
File Role Description
  Plain text file Media.php Class Class source
  Plain text file Model.php Class Class source
  Plain text file Moderation.php Class Class source

  Files folder image Files (16)  /  src  /  Traits  
File Role Description
  Plain text file HasAttributes.php Class Class source
  Plain text file HasGuzzleClient.php Class Class source
  Plain text file HasTasks.php Class Class source

  Files folder image Files (16)  /  tests  
File Role Description
Files folder imagedata (1 file)
  Plain text file Test.php Class Class source

  Files folder image Files (16)  /  tests  /  data  
File Role Description
  Plain text file response.json Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:163
This week:0
All time:8,933
This week:51Up