CoolFace
Apppublic

artzeraw/shapy-anthropometry-api

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes
App README

SHAPY Body Measurements API

Accurate body measurements from photos using SHAPY model.

Current Status

๐ŸŸก Testing Phase - Returns fake data for API validation

Roadmap

  • โ€”[x] Basic Gradio API setup
  • โ€”[x] API endpoint /api/predict
  • โ€”[ ] Integrate SHAPY model
  • โ€”[ ] GPU optimization
  • โ€”[ ] Production deployment

Usage

Web UI

Visit the Space URL and upload front + side photos.

API (Python)

python
import requests

API_URL = "https://YOUR-USERNAME-SPACE-NAME.hf.space/api/predict"

files = {
    "data": [
        ("front.jpg", open("front.jpg", "rb"), "image/jpeg"),
        ("side.jpg", open("side.jpg", "rb"), "image/jpeg")
    ]
}

response = requests.post(API_URL, files=files)
print(response.json())

API (cURL)

bash
curl -X POST \
  https://YOUR-USERNAME-SPACE-NAME.hf.space/api/predict \
  -F "data=@front.jpg" \
  -F "data=@side.jpg"

Response Format

json
{
  "measurements": {
    "neck_cm": 38.5,
    "chest_cm": 98.2,
    "waist_cm": 85.3,
    "hip_cm": 102.7
  },
  "estimated": {
    "height_cm": 175.0,
    "weight_kg": 72.5
  },
  "confidence": 0.92,
  "model": "SHAPY-v1"
}

Integration

This API is designed to work with the Antropometria project.

License

MIT License - See LICENSE file for details