1 Star 0 Fork 0

db/sd-webui-3d-open-pose-editor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.py 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
nonnonstop 提交于 2年前 . Cache assets locally
import pathlib
import requests
try:
root_path = pathlib.Path(__file__).resolve().parents[0]
except NameError:
import inspect
root_path = pathlib.Path(inspect.getfile(lambda: None)).resolve().parents[0]
def download(url: str, dest: pathlib.Path):
try:
with requests.get(url, stream=True) as r:
with open(dest, "wb") as f:
for chunk in r.iter_content(chunk_size=1024):
f.write(chunk)
except requests.exceptions.RequestException as e:
print(e)
def main():
MEDIAPIPE_POSE_VERSION = "0.5.1675469404"
mediapipe_dir = root_path / "downloads" / "pose" / MEDIAPIPE_POSE_VERSION
mediapipe_dir.mkdir(mode=0o755, parents=True, exist_ok=True)
for file_name in [
"pose_landmark_full.tflite",
"pose_web.binarypb",
"pose_solution_packed_assets.data",
"pose_solution_simd_wasm_bin.wasm",
"pose_solution_packed_assets_loader.js",
"pose_solution_simd_wasm_bin.js",
]:
file_path = mediapipe_dir / file_name
if file_path.exists():
continue
url = f"https://cdn.jsdelivr.net/npm/@mediapipe/pose@{MEDIAPIPE_POSE_VERSION}/{file_name}"
print(f"Downloading {file_name}...")
download(url, file_path)
main()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dbscholar0/sd-webui-3d-open-pose-editor.git
git@gitee.com:dbscholar0/sd-webui-3d-open-pose-editor.git
dbscholar0
sd-webui-3d-open-pose-editor
sd-webui-3d-open-pose-editor
main

搜索帮助