February 5, 2024 (3 months ago)

Face Data Generator for Pixelsplasher Products


This face detection tool was primarily made for auto-cropping images in Pixelsplasher Batch Smart Layer Replace, a plugin script for Adobe Photoshop. It uses face-api.js on top of the tensorflow.js core API.

It was originally intended to run inside Adobe Photoshop as part of an add-on to Batch Smart Layer Replace but face-api.js is not compatible with the Photoshop javascript and UXP API. It runs best in a native browser environment.

Sample face detect result of family photo in garden

For its file input interface, Face Data Generator uses the File System Access API which is supported in Windows browsers. It can also fall back to legacy file access methods in Mac browsers.

What it is for

During auto replacement of smart layers by Batch Smart Layer Replace, the user may choose a placement option called “face crop” which uses face data to determine auto cropping the replacement image to approximately the size of the face. If there is more than one face and the user has chosen the additional option to crop only one of the faces, the highest face score will determine which one to crop.

The generated XML files may also be useful for future products of Pixelsplasher and other developers.

Features

Standard XML output format

Face Data Generator generates face data in XML format files saved in an auto-created subfolder of the user’s chosen folder of face images. Each file is named after each image file input and saved only if there is at least one face detected.

The XML files contain the following data: face size in rectangular dimension, face location coordinates, and face relevance score.

Face bounds preview

The user can see a preview of the detected faces during face data generation. These are represented as boxes around the faces, each one labeled with the face detection relevance score.

No uploading of input files

The file input interface uses Blob URLs to point to locally stored files chosen by te user so there is no upload process.

Link

Go to the Face Data Generator page preferably using any of the following browsers:

  • Google Chrome v86+
  • Microsoft Edge v86+