Spaces:
Sleeping
Sleeping
Commit
·
407b708
1
Parent(s):
9e141ea
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,10 +25,12 @@ if "models" in pathlib.Path.cwd().parts:
|
|
| 25 |
elif not pathlib.Path('models').exists():
|
| 26 |
os.system('git clone --depth 1 https://github.com/tensorflow/models')
|
| 27 |
os.chdir('models/research/')
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
import
|
|
|
|
|
|
|
| 32 |
# patch tf1 into `utils.ops`
|
| 33 |
utils_ops.tf = tf.compat.v1
|
| 34 |
|
|
|
|
| 25 |
elif not pathlib.Path('models').exists():
|
| 26 |
os.system('git clone --depth 1 https://github.com/tensorflow/models')
|
| 27 |
os.chdir('models/research/')
|
| 28 |
+
os.system('protoc object_detection/protos/*.proto --python_out=.')
|
| 29 |
+
os.system('cp object_detection/packages/tf2/setup.py .')
|
| 30 |
+
os.system('python -m pip install .')
|
| 31 |
+
from object_detection.utils import ops as utils_ops
|
| 32 |
+
from object_detection.utils import label_map_util
|
| 33 |
+
from object_detection.utils import visualization_utils as vis_utils
|
| 34 |
# patch tf1 into `utils.ops`
|
| 35 |
utils_ops.tf = tf.compat.v1
|
| 36 |
|