artzeraw/shapy-anthropometry-api
0
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)
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)
curl -X POST \
https://YOUR-USERNAME-SPACE-NAME.hf.space/api/predict \
-F "data=@front.jpg" \
-F "data=@side.jpg"Response Format
{
"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
