Spaces:
Runtime error
Runtime error
brjathu
commited on
Commit
Β·
9c71efd
1
Parent(s):
3987f44
Adding HF files
Browse files
.gitignore
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Specific
|
| 2 |
-
/
|
| 3 |
/results/
|
| 4 |
/sandbox/
|
| 5 |
*.lock
|
|
@@ -16,7 +16,7 @@ token_channel.csv
|
|
| 16 |
__pycache__/
|
| 17 |
*.py[cod]
|
| 18 |
*$py.class
|
| 19 |
-
logs/
|
| 20 |
# C extensions
|
| 21 |
*.so
|
| 22 |
|
|
|
|
| 1 |
# Specific
|
| 2 |
+
/logs2/
|
| 3 |
/results/
|
| 4 |
/sandbox/
|
| 5 |
*.lock
|
|
|
|
| 16 |
__pycache__/
|
| 17 |
*.py[cod]
|
| 18 |
*$py.class
|
| 19 |
+
# logs/
|
| 20 |
# C extensions
|
| 21 |
*.so
|
| 22 |
|
app.py
CHANGED
|
@@ -7,7 +7,8 @@ import gradio as gr
|
|
| 7 |
import numpy as np
|
| 8 |
import torch
|
| 9 |
from PIL import Image
|
| 10 |
-
|
|
|
|
| 11 |
from hmr2.configs import get_config
|
| 12 |
from hmr2.datasets.vitdet_dataset import (DEFAULT_MEAN, DEFAULT_STD,
|
| 13 |
ViTDetDataset)
|
|
@@ -15,6 +16,16 @@ from hmr2.models import HMR2
|
|
| 15 |
from hmr2.utils import recursive_to
|
| 16 |
from hmr2.utils.renderer import Renderer, cam_crop_to_full
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Setup HMR2.0 model
|
| 19 |
LIGHT_BLUE=(0.65098039, 0.74117647, 0.85882353)
|
| 20 |
DEFAULT_CHECKPOINT='logs/train/multiruns/hmr2/0/checkpoints/epoch=35-step=1000000.ckpt'
|
|
|
|
| 7 |
import numpy as np
|
| 8 |
import torch
|
| 9 |
from PIL import Image
|
| 10 |
+
os.system('pip install /home/user/app/vendor/pyrender')
|
| 11 |
+
sys.path.append('/home/user/app/vendor/pyrender')
|
| 12 |
from hmr2.configs import get_config
|
| 13 |
from hmr2.datasets.vitdet_dataset import (DEFAULT_MEAN, DEFAULT_STD,
|
| 14 |
ViTDetDataset)
|
|
|
|
| 16 |
from hmr2.utils import recursive_to
|
| 17 |
from hmr2.utils.renderer import Renderer, cam_crop_to_full
|
| 18 |
|
| 19 |
+
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
| 20 |
+
os.environ["MESA_GL_VERSION_OVERRIDE"] = "4.1"
|
| 21 |
+
|
| 22 |
+
try:
|
| 23 |
+
import detectron2
|
| 24 |
+
except:
|
| 25 |
+
import os
|
| 26 |
+
os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
|
| 27 |
+
|
| 28 |
+
|
| 29 |
# Setup HMR2.0 model
|
| 30 |
LIGHT_BLUE=(0.65098039, 0.74117647, 0.85882353)
|
| 31 |
DEFAULT_CHECKPOINT='logs/train/multiruns/hmr2/0/checkpoints/epoch=35-step=1000000.ckpt'
|
{train β logs/train}/multiruns/hmr2/0/checkpoints/epoch=35-step=1000000.ckpt
RENAMED
|
File without changes
|
{train β logs/train}/multiruns/hmr2/0/dataset_config.yaml
RENAMED
|
File without changes
|
{train β logs/train}/multiruns/hmr2/0/model_config.yaml
RENAMED
|
File without changes
|
upload_logs.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from huggingface_hub import HfApi
|
| 2 |
+
api = HfApi()
|
| 3 |
+
api.upload_folder(
|
| 4 |
+
folder_path="logs",
|
| 5 |
+
repo_id="brjathu/HMR",
|
| 6 |
+
repo_type="space",
|
| 7 |
+
)
|