Spaces:
Sleeping
Sleeping
efengx
commited on
Commit
·
a3ecec7
1
Parent(s):
0098847
fix: update
Browse files- fengxai/SelfSupervised.py +1 -3
- fengxai/inference.py +4 -2
fengxai/SelfSupervised.py
CHANGED
@@ -75,6 +75,4 @@ class SelfSupervised:
|
|
75 |
"imageWidth": w,
|
76 |
"objectHeight": boxesHeight,
|
77 |
"objectWidth": boxesWidth
|
78 |
-
}
|
79 |
-
|
80 |
-
selfSupervised = SelfSupervised()
|
|
|
75 |
"imageWidth": w,
|
76 |
"objectHeight": boxesHeight,
|
77 |
"objectWidth": boxesWidth
|
78 |
+
}
|
|
|
|
fengxai/inference.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import os
|
2 |
-
from fengxai.SelfSupervised import
|
|
|
3 |
|
4 |
def imagePrediction(imageFile, funcCallback):
|
5 |
if not os.path.exists("weights/sam_vit_h_4b8939.pth") \
|
@@ -15,6 +16,7 @@ def imagePrediction(imageFile, funcCallback):
|
|
15 |
&& cd ..
|
16 |
"""
|
17 |
os.system(cmd)
|
18 |
-
|
|
|
19 |
funcCallback(selfSupervised.imagePredict(imageFile))
|
20 |
|
|
|
1 |
import os
|
2 |
+
from fengxai.SelfSupervised import SelfSupervised
|
3 |
+
|
4 |
|
5 |
def imagePrediction(imageFile, funcCallback):
|
6 |
if not os.path.exists("weights/sam_vit_h_4b8939.pth") \
|
|
|
16 |
&& cd ..
|
17 |
"""
|
18 |
os.system(cmd)
|
19 |
+
|
20 |
+
selfSupervised = SelfSupervised()
|
21 |
funcCallback(selfSupervised.imagePredict(imageFile))
|
22 |
|