AneetaXavier commited on
Commit
827b4ad
·
1 Parent(s): 3f90f16

Add download script for model file (no large model file)

Browse files
Files changed (1) hide show
  1. download_model.py +21 -0
download_model.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import urllib.request
2
+ import os
3
+
4
+ def download_model():
5
+ model_url = "https://github.com/CMU-Perceptual-Computing-Lab/openpose/raw/master/models/pose/coco/pose_iter_440000.caffemodel"
6
+ proto_url = "https://raw.githubusercontent.com/CMU-Perceptual-Computing-Lab/openpose/master/models/pose/coco/pose_deploy_linevec.prototxt"
7
+
8
+ print("Downloading pose estimation model...")
9
+
10
+ # Download the model file
11
+ urllib.request.urlretrieve(model_url, "pose_model.caffemodel")
12
+ print("Downloaded pose model")
13
+
14
+ # Download the prototxt file
15
+ urllib.request.urlretrieve(proto_url, "pose_deploy_linevec.prototxt")
16
+ print("Downloaded prototxt file")
17
+
18
+ print("Model files downloaded successfully!")
19
+
20
+ if __name__ == "__main__":
21
+ download_model()