Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

onnx-community
/
vitpose-base-simple

Keypoint Detection
Transformers.js
ONNX
vitpose
Model card Files Files and versions
xet
Community

Instructions to use onnx-community/vitpose-base-simple with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers.js

    How to use onnx-community/vitpose-base-simple with Transformers.js:

    // npm i @huggingface/transformers
    import { AutoModel, AutoImageProcessor, RawImage } from '@huggingface/transformers';
    
    const model = await AutoModel.from_pretrained('onnx-community/vitpose-base-simple');
    const processor = await AutoImageProcessor.from_pretrained('onnx-community/vitpose-base-simple');
    
    const image = await RawImage.read('https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/ryan-gosling.jpg');
    const inputs = await processor(image);
    const { heatmaps } = await model(inputs);
    
    // ViTPose is a top-down model: pass one box per person, in COCO format [x, y, width, height]
    const boxes = [[[0, 0, image.width, image.height]]];
    const results = processor.post_process_pose_estimation(heatmaps, boxes)[0][0];
    console.log(results); // { bbox, scores, labels, keypoints }
vitpose-base-simple
938 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 9 commits
Xenova's picture
Xenova HF Staff
Update README.md
bbebbdd verified about 2 years ago
  • onnx
    Upload folder using huggingface_hub about 2 years ago
  • .gitattributes
    1.52 kB
    initial commit about 2 years ago
  • README.md
    3.16 kB
    Update README.md about 2 years ago
  • config.json
    1.63 kB
    Update config.json about 2 years ago
  • preprocessor_config.json
    363 Bytes
    Upload folder using huggingface_hub about 2 years ago
  • quantize_config.json
    283 Bytes
    Upload folder using huggingface_hub about 2 years ago