Spaces:
Sleeping
Sleeping
| import urllib.request | |
| import os | |
| def download_model(): | |
| model_url = "https://github.com/CMU-Perceptual-Computing-Lab/openpose/raw/master/models/pose/coco/pose_iter_440000.caffemodel" | |
| proto_url = "https://raw.githubusercontent.com/CMU-Perceptual-Computing-Lab/openpose/master/models/pose/coco/pose_deploy_linevec.prototxt" | |
| print("Downloading pose estimation model...") | |
| # Download the model file | |
| urllib.request.urlretrieve(model_url, "pose_model.caffemodel") | |
| print("Downloaded pose model") | |
| # Download the prototxt file | |
| urllib.request.urlretrieve(proto_url, "pose_deploy_linevec.prototxt") | |
| print("Downloaded prototxt file") | |
| print("Model files downloaded successfully!") | |
| if __name__ == "__main__": | |
| download_model() |