Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ from zipfile import ZipFile
|
|
16 |
from vincenty import vincenty
|
17 |
import json
|
18 |
#import DracoPy
|
|
|
19 |
|
20 |
from depth_anything.dpt import DepthAnything
|
21 |
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
|
@@ -139,7 +140,9 @@ def make_video(video_path, outdir='./vis_video_depth', encoder='vits'):
|
|
139 |
if len(thumbnail_old) > 0:
|
140 |
diff = thumbnail - thumbnail_old
|
141 |
print(diff)
|
142 |
-
|
|
|
|
|
143 |
continue
|
144 |
thumbnail_old = thumbnail
|
145 |
|
|
|
16 |
from vincenty import vincenty
|
17 |
import json
|
18 |
#import DracoPy
|
19 |
+
from collections import Counter
|
20 |
|
21 |
from depth_anything.dpt import DepthAnything
|
22 |
from depth_anything.util.transform import Resize, NormalizeImage, PrepareForNet
|
|
|
140 |
if len(thumbnail_old) > 0:
|
141 |
diff = thumbnail - thumbnail_old
|
142 |
print(diff)
|
143 |
+
c = Counter(diff)
|
144 |
+
value, count = c.most_common()[0]
|
145 |
+
if value == 0:
|
146 |
continue
|
147 |
thumbnail_old = thumbnail
|
148 |
|