npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ai-pose-generator-2

v1766998.955.553

Published

Professional integration for https://supermaker.ai/image/ai-pose-generator/

Readme

ai-pose-generator-2

A JavaScript library to generate AI-powered pose estimations from images. This tool simplifies the process of extracting human pose data for various applications.

Installation

bash npm install ai-pose-generator-2

Usage Examples

Here are several examples demonstrating how to use ai-pose-generator-2 in different scenarios:

1. Basic Pose Estimation from a Local Image: javascript const aiPoseGenerator = require('ai-pose-generator-2'); const fs = require('fs');

async function processImage() { try { const imageBuffer = fs.readFileSync('path/to/your/image.jpg'); // Replace with your image path const poseData = await aiPoseGenerator.estimatePose(imageBuffer);

console.log("Pose Data:", poseData);

// Process the pose data (e.g., visualize keypoints)

} catch (error) { console.error("Error processing image:", error); } }

processImage();

2. Pose Estimation from a URL: javascript const aiPoseGenerator = require('ai-pose-generator-2');

async function processImageUrl() { try { const imageUrl = 'https://example.com/image.jpg'; // Replace with your image URL const poseData = await aiPoseGenerator.estimatePoseFromUrl(imageUrl);

console.log("Pose Data from URL:", poseData);

// Use the pose data for further processing

} catch (error) { console.error("Error processing image URL:", error); } }

processImageUrl();

3. Customizing Confidence Threshold: javascript const aiPoseGenerator = require('ai-pose-generator-2'); const fs = require('fs');

async function processImageWithThreshold() { try { const imageBuffer = fs.readFileSync('path/to/your/image.jpg'); const options = { confidenceThreshold: 0.5 // Adjust the confidence threshold as needed }; const poseData = await aiPoseGenerator.estimatePose(imageBuffer, options);

console.log("Pose Data with Threshold:", poseData);

} catch (error) { console.error("Error processing image with threshold:", error); } }

processImageWithThreshold();

4. Using with Express.js (Node.js): javascript const express = require('express'); const aiPoseGenerator = require('ai-pose-generator-2'); const multer = require('multer'); // For handling file uploads

const app = express(); const upload = multer({ dest: 'uploads/' }); // Store uploaded files in 'uploads/'

app.post('/estimate-pose', upload.single('image'), async (req, res) => { try { const imageBuffer = fs.readFileSync(req.file.path); const poseData = await aiPoseGenerator.estimatePose(imageBuffer);

res.json(poseData);

} catch (error) { console.error("Error processing image:", error); res.status(500).json({ error: 'Failed to estimate pose' }); } });

app.listen(3000, () => { console.log('Server listening on port 3000'); });

5. Handling Multiple Poses in an Image: javascript const aiPoseGenerator = require('ai-pose-generator-2'); const fs = require('fs');

async function processMultiplePoses() { try { const imageBuffer = fs.readFileSync('path/to/your/multiple_poses.jpg'); const poseData = await aiPoseGenerator.estimatePose(imageBuffer);

if (Array.isArray(poseData)) {
    poseData.forEach((pose, index) => {
        console.log(`Pose ${index + 1}:`, pose);
    });
} else {
    console.log("Single Pose Data:", poseData);
}

} catch (error) { console.error("Error processing image with multiple poses:", error); } }

processMultiplePoses();

API Summary

  • estimatePose(imageBuffer: Buffer, options?: Object): Promise<Object | Array<Object>>: Estimates the human pose(s) from an image buffer.
    • imageBuffer: A Buffer containing the image data.
    • options: (Optional) An object containing configuration options:
      • confidenceThreshold: (Optional) A number between 0 and 1 representing the minimum confidence score for a keypoint to be considered valid. Defaults to a sensible value.
  • estimatePoseFromUrl(imageUrl: string, options?: Object): Promise<Object | Array<Object>>: Estimates the human pose(s) from an image URL.
    • imageUrl: A string representing the URL of the image.
    • options: (Optional) An object containing configuration options (same as estimatePose).

License

MIT

This package is part of the ai-pose-generator-2 ecosystem. For advanced features and enterprise-grade tools, visit: https://supermaker.ai/image/ai-pose-generator/