Spaces:
Sleeping
Sleeping
Create pipeline/rtlucassen_wrapper.py
Browse files
pipeline/rtlucassen_wrapper.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
def is_ready():
|
| 3 |
+
return os.path.isdir("external/B-line_detection"), os.path.isdir("models/rtlucassen")
|
| 4 |
+
|
| 5 |
+
def run_bline_detector(_video_or_frames):
|
| 6 |
+
repo_ok, weights_ok = is_ready()
|
| 7 |
+
if not repo_ok: raise RuntimeError("Original repo missing: external/B-line_detection")
|
| 8 |
+
if not weights_ok: raise RuntimeError("Weights missing. Put authorized BEDLUS weights in models/rtlucassen/")
|
| 9 |
+
# TODO: wire actual inference once weights are uploaded (kept original code untouched)
|
| 10 |
+
return [0,1,2,1,0], [1,1,1,1,1]
|