Spaces:
Running
on
A10G
Running
on
A10G
Update evaluate.py
Browse files- evaluate.py +7 -10
evaluate.py
CHANGED
@@ -254,7 +254,6 @@ def eval(test, standard, tmpdir):
|
|
254 |
return sum(scores) / len(scores), final_merged_intervals, comments
|
255 |
|
256 |
def install():
|
257 |
-
import torch
|
258 |
if torch.cuda.is_available():
|
259 |
cu_version = torch.version.cuda
|
260 |
cu_version = f"cu{cu_version.replace('.', '')}" # Format it as 'cuXX' (e.g., 'cu113')
|
@@ -265,15 +264,13 @@ def install():
|
|
265 |
|
266 |
pip_command = f'pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html'
|
267 |
|
268 |
-
print("Executing command:", pip_command)
|
269 |
|
270 |
-
|
271 |
-
# os.system(pip_command)
|
272 |
|
273 |
-
|
274 |
# # os.system('mim install "mmcv>=2.0.1"')
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
|
|
254 |
return sum(scores) / len(scores), final_merged_intervals, comments
|
255 |
|
256 |
def install():
|
|
|
257 |
if torch.cuda.is_available():
|
258 |
cu_version = torch.version.cuda
|
259 |
cu_version = f"cu{cu_version.replace('.', '')}" # Format it as 'cuXX' (e.g., 'cu113')
|
|
|
264 |
|
265 |
pip_command = f'pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{torch_version}/index.html'
|
266 |
|
|
|
267 |
|
268 |
+
os.system(pip_command)
|
|
|
269 |
|
270 |
+
os.system('mim install mmengine')
|
271 |
# # os.system('mim install "mmcv>=2.0.1"')
|
272 |
+
os.system('mim install "mmdet>=3.1.0"')
|
273 |
+
os.system('git clone https://github.com/open-mmlab/mmpose.git')
|
274 |
+
os.chdir('mmpose')
|
275 |
+
os.system('pip install -r requirements.txt')
|
276 |
+
os.system('pip install -v -e .')
|