Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import json
|
|
5 |
import zipfile
|
6 |
from tools.demo_api import build_predictor, run_detection
|
7 |
import shutil
|
8 |
-
import
|
9 |
|
10 |
PREDICTOR = build_predictor(
|
11 |
exp_file = "exps/yolox_s.py",
|
@@ -43,7 +43,7 @@ def process_yolox_api(files):
|
|
43 |
try:
|
44 |
|
45 |
coco_json_path = run_detection(PREDICTOR, input_dir)
|
46 |
-
cropped_paths =
|
47 |
|
48 |
# Create zip file
|
49 |
zip_path = os.path.join(temp_dir, "cropped_results.zip")
|
|
|
5 |
import zipfile
|
6 |
from tools.demo_api import build_predictor, run_detection
|
7 |
import shutil
|
8 |
+
from square_crop import run_square_crop
|
9 |
|
10 |
PREDICTOR = build_predictor(
|
11 |
exp_file = "exps/yolox_s.py",
|
|
|
43 |
try:
|
44 |
|
45 |
coco_json_path = run_detection(PREDICTOR, input_dir)
|
46 |
+
cropped_paths = run_square_crop(input_dir, coco_json_path, cropped_dir)
|
47 |
|
48 |
# Create zip file
|
49 |
zip_path = os.path.join(temp_dir, "cropped_results.zip")
|