CloudPose is a high-performance, containerized pose estimation service built with FastAPI, TensorFlow Lite, and OpenCV. It exposes RESTful endpoints for JSON‐based and image‐based inference, supports load testing via Locust, and can be deployed locally, in Docker, or on Kubernetes.
- Python 3.10 or newer
- pip package manager
- Docker (optional, for container builds)
- kubectl & a Kubernetes cluster (optional)
- Locust (for load testing)
Install dependencies
python -m venv venv # optional but recommended
source venv/bin/activate # Linux/macOS
# .\venv\Scripts\activate # Windows PowerShell
pip install --upgrade pip
pip install -r requirements.txt-
Start the API server
uvicorn app.main:app --host 0.0.0.0 --port 60000
-
Verify endpoints
curl -X 'POST' \ 'http://207.211.146.117:30000/pose/json' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"id": <base64-image-string>, "images": <base64-image-string>}'
curl -X 'POST' \ 'http://207.211.146.117:30000/pose/image' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{"id": <base64-image-string>, "image": <base64-image-string>}'
-
Run Locust (headless)
locust -f experiments/locustfile.py \ --host http://localhost:60000 \ --users 100 --spawn-rate 10 --run-time 1m
-
Build the Docker image
docker build -t cloudpose:latest . -
Run the container
docker run -d -p 60000:60000 --name cloudpose cloudpose:latest
-
Test the service
curl http://localhost:60000/pose/json
-
Apply manifests
kubectl apply -f k8s/namespace.yaml kubectl apply -f k8s/deployment.yaml kubectl apply -f k8s/service.yaml
-
Check rollout status
kubectl -n cloudpose get pods,svc
-
Access via NodePort
-
The service exposes port
60000as a NodePort; query any node IP:curl http://<NODE_IP>:<NODE_PORT>/pose/json
-