
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
A JavaScript face comparison library that automatically handles model loading and provides easy-to-use face similarity detection.
npm install bakuparjo
import FaceComparison from 'bakuparjo';
async function checkAttendance() {
const faceComparer = new FaceComparison();
const collectionImages = [
"/media/person1.jpg",
"/media/person2.jpg",
"/media/person3.jpg"
];
const loginImage = "/facelogin/new-capture.jpg";
try {
const results = await faceComparer.compareFaces(loginImage, collectionImages);
console.log('Similarity results:');
results.forEach(result => {
console.log(${result.imagePath}: ${result.similarity}% similar);
});
const mostSimilar = results.reduce((prev, current) =>
(parseFloat(prev.similarity) > parseFloat(current.similarity)) ? prev : current
);
console.log(Most similar image: ${mostSimilar.imagePath} with ${mostSimilar.similarity}% similarity);
} catch (error) {
console.error('Error comparing faces:', error);
}
}
const faceComparer = new FaceComparison({
threshold: 0.5, // Adjust similarity threshold (lower = stricter)
modelPath: './my-models' // Custom model path
});
new FaceComparison(options)Creates a new face comparison instance.
Options:
threshold (number): Similarity threshold (default: 0.6)modelPath (string): Path to store/load models (default: './models' in Node.js, '/models' in browser)async loadModels()Loads the required face recognition models. Called automatically when needed.
async compareFaces(referenceImagePath, collectionImagePaths)Compares a reference face with a collection of faces.
Parameters:
referenceImagePath (string): Path to the reference imagecollectionImagePaths (array): Array of paths to compare againstReturns: Array of objects with:
imagePath (string): Path to the compared imagesimilarity (string): Percentage similarity (0-100%)error (string, optional): Error message if processing failedFor browser environments, make sure the models are available in your web root:
<!-- Models should be available at /models/ -->
<script type="module">
import FaceComparison from 'bakuparjo';
const faceComparer = new FaceComparison();
// ...
</script>
MIT
FAQs
Simple face comparison library with auto model download
We found that bakuparjo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.