File size: 514 Bytes
49d09c3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import os
import subprocess
# Clone the repository
if not os.path.exists("wdv3-jax"):
repo_url = "https://github.com/SmilingWolf/wdv3-jax.git"
subprocess.run(["git", "clone", repo_url])
# Change directory to the cloned repository
os.chdir("wdv3-jax")
subprocess.run(["bash", "setup.sh"])
model_type = "swinv2" # or "convnext" or "vit"
image_path = "../test-img.png"
with open("output.txt", "w") as output_file:
subprocess.run(["python", "wdv3_jax.py", model_type, image_path], stdout=output_file)
|