Spaces:
Runtime error
Runtime error
osanseviero
commited on
Commit
•
945ea31
1
Parent(s):
af32f74
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,6 @@ from collections import deque
|
|
5 |
import cv2
|
6 |
import torch
|
7 |
|
8 |
-
from detectron2.data import MetadataCatalog
|
9 |
-
from detectron2.engine.defaults import DefaultPredictor
|
10 |
-
from detectron2.utils.video_visualizer import VideoVisualizer
|
11 |
-
from detectron2.utils.visualizer import ColorMode, Visualizer
|
12 |
import argparse
|
13 |
import glob
|
14 |
import multiprocessing as mp
|
@@ -21,17 +17,20 @@ import cv2
|
|
21 |
import subprocess
|
22 |
import tqdm
|
23 |
|
24 |
-
from detectron2.config import get_cfg
|
25 |
-
from detectron2.data.detection_utils import read_image
|
26 |
-
from detectron2.utils.logger import setup_logger
|
27 |
-
|
28 |
import gradio as gr
|
29 |
-
|
30 |
TOTAL_FRAMES = 40
|
31 |
|
32 |
subprocess.run(["pip", "install", "git+https://github.com/wjf5203/VNext.git"])
|
33 |
subprocess.run(["git", "clone", "https://github.com/wjf5203/VNext"])
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
def setup_cfg(cfg):
|
36 |
# load config from file and command-line arguments
|
37 |
cfg = get_cfg()
|
|
|
5 |
import cv2
|
6 |
import torch
|
7 |
|
|
|
|
|
|
|
|
|
8 |
import argparse
|
9 |
import glob
|
10 |
import multiprocessing as mp
|
|
|
17 |
import subprocess
|
18 |
import tqdm
|
19 |
|
|
|
|
|
|
|
|
|
20 |
import gradio as gr
|
|
|
21 |
TOTAL_FRAMES = 40
|
22 |
|
23 |
subprocess.run(["pip", "install", "git+https://github.com/wjf5203/VNext.git"])
|
24 |
subprocess.run(["git", "clone", "https://github.com/wjf5203/VNext"])
|
25 |
|
26 |
+
from detectron2.data import MetadataCatalog
|
27 |
+
from detectron2.data.detection_utils import read_image
|
28 |
+
from detectron2.engine.defaults import DefaultPredictor
|
29 |
+
from detectron2.utils.video_visualizer import VideoVisualizer
|
30 |
+
from detectron2.utils.visualizer import ColorMode, Visualizer
|
31 |
+
from detectron2.config import get_cfg
|
32 |
+
from detectron2.utils.logger import setup_logger
|
33 |
+
|
34 |
def setup_cfg(cfg):
|
35 |
# load config from file and command-line arguments
|
36 |
cfg = get_cfg()
|