Spaces:
Sleeping
Sleeping
Commit
·
6677709
1
Parent(s):
b9b435f
replace ipynb magic
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@
|
|
8 |
|
9 |
import os
|
10 |
import glob
|
|
|
11 |
from pathlib import Path
|
12 |
from subprocess import run
|
13 |
import json
|
@@ -44,9 +45,9 @@ n_models = len(rst_files)
|
|
44 |
|
45 |
|
46 |
def fast_yolo_crop(image):
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
mpimg.imsave(yolo_source, image)
|
51 |
|
52 |
#print(f"\nInference on best {len(checkpoint_files[5:])} models with detect.py ...")
|
|
|
8 |
|
9 |
import os
|
10 |
import glob
|
11 |
+
from shutil import rmtree
|
12 |
from pathlib import Path
|
13 |
from subprocess import run
|
14 |
import json
|
|
|
45 |
|
46 |
|
47 |
def fast_yolo_crop(image):
|
48 |
+
rmtree(working / 'labels')
|
49 |
+
rmtree(working / 'results_ensemble')
|
50 |
+
|
51 |
mpimg.imsave(yolo_source, image)
|
52 |
|
53 |
#print(f"\nInference on best {len(checkpoint_files[5:])} models with detect.py ...")
|