Upload folder using huggingface_hub
Browse files- app.py +1 -1
- flame_tracking_single_image.py +3 -1
- lam/runners/__init__.py +0 -1
app.py
CHANGED
@@ -372,7 +372,7 @@ def demo_lam(flametracking, lam, cfg):
|
|
372 |
def core_fn_space(image_path: str, video_params, working_dir):
|
373 |
return core_fn(image_path, video_params, working_dir)
|
374 |
|
375 |
-
with gr.Blocks(analytics_enabled=False) as demo:
|
376 |
|
377 |
logo_url = './assets/images/logo.jpeg'
|
378 |
logo_base64 = get_image_base64(logo_url)
|
|
|
372 |
def core_fn_space(image_path: str, video_params, working_dir):
|
373 |
return core_fn(image_path, video_params, working_dir)
|
374 |
|
375 |
+
with gr.Blocks(analytics_enabled=False, delete_cache=[3600, 3600]) as demo:
|
376 |
|
377 |
logo_url = './assets/images/logo.jpeg'
|
378 |
logo_base64 = get_image_base64(logo_url)
|
flame_tracking_single_image.py
CHANGED
@@ -140,7 +140,9 @@ class FlameTrackingSingleImage:
|
|
140 |
frame_index = 0
|
141 |
|
142 |
# Bounding box detection
|
143 |
-
frame = torchvision.io.read_image(input_image_path)
|
|
|
|
|
144 |
try:
|
145 |
_, frame_bbox, _ = self.vgghead_encoder(frame, frame_index)
|
146 |
except Exception:
|
|
|
140 |
frame_index = 0
|
141 |
|
142 |
# Bounding box detection
|
143 |
+
# frame = torchvision.io.read_image(input_image_path)
|
144 |
+
frame = cv2.imread(input_image_path)[:, :, ::-1].copy()
|
145 |
+
frame = torch.Tensor(frame).permute(2, 0, 1).contiguous()[:3, ...]
|
146 |
try:
|
147 |
_, frame_bbox, _ = self.vgghead_encoder(frame, frame_index)
|
148 |
except Exception:
|
lam/runners/__init__.py
CHANGED
@@ -17,5 +17,4 @@ from lam.utils.registry import Registry
|
|
17 |
|
18 |
REGISTRY_RUNNERS = Registry()
|
19 |
|
20 |
-
from .train import *
|
21 |
from .infer import *
|
|
|
17 |
|
18 |
REGISTRY_RUNNERS = Registry()
|
19 |
|
|
|
20 |
from .infer import *
|