diff --git a/config.json b/config.json index f1919cc..297b1d3 100644 --- a/config.json +++ b/config.json @@ -11,7 +11,7 @@ "task_location": "workspace_tasks", "entrypoint": "python -m uvicorn src.main:app --host 0.0.0.0 --port 8000", "port": 8000, - "docker_image": "supervisely/model-benchmark:0.0.7", + "docker_image": "supervisely/model-benchmark:0.0.9", "instance_version": "6.11.10", "context_menu": { "target": ["images_project"] diff --git a/dev_requirements.txt b/dev_requirements.txt index aba805f..bd9d0b6 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -1,2 +1,2 @@ # git+https://github.com/supervisely/supervisely.git@model-benchmark -supervisely[model-benchmark]==6.73.183 \ No newline at end of file +supervisely[model-benchmark]==6.73.187 \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 89e836f..45bab34 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,5 +1,5 @@ -FROM supervisely/base-py-sdk:6.73.183 +FROM supervisely/base-py-sdk:6.73.187 -RUN python3 -m pip install supervisely[model-benchmark]==6.73.183 +RUN python3 -m pip install supervisely[model-benchmark]==6.73.187 -LABEL python_sdk_version=6.73.183 \ No newline at end of file +LABEL python_sdk_version=6.73.187 \ No newline at end of file diff --git a/src/main.py b/src/main.py index dc1fa6a..873a940 100644 --- a/src/main.py +++ b/src/main.py @@ -30,12 +30,14 @@ def main_func(): return pbar.show() + sec_pbar.show() if task_type == "object detection": bm = ObjectDetectionBenchmark( api, project.id, output_dir=g.STORAGE_DIR + "/benchmark", progress=pbar, + progress_secondary=sec_pbar, classes_whitelist=g.selected_classes, ) elif task_type == "instance segmentation": @@ -44,6 +46,7 @@ def main_func(): project.id, output_dir=g.STORAGE_DIR + "/benchmark", progress=pbar, + progress_secondary=sec_pbar, classes_whitelist=g.selected_classes, ) sly.logger.info(f"{g.session_id = }") @@ -59,6 +62,7 @@ def main_func(): try: bm.run_speedtest(g.session_id, g.project_id) + sec_pbar.hide() bm.upload_speedtest_results(res_dir + "/speedtest/") except Exception as e: sly.logger.warn(f"Speedtest failed. Skipping. {e}") @@ -108,6 +112,7 @@ def main_func(): button.disable() pbar = widgets.SlyTqdm() +sec_pbar = widgets.Progress("") report_model_benchmark = widgets.ReportThumbnail() report_model_benchmark.hide() @@ -115,7 +120,9 @@ def main_func(): controls_card = widgets.Card( title="Settings", description="Select Ground Truth project and deployed model session", - content=widgets.Container([sel_project, sel_app_session, button, report_model_benchmark, pbar]), + content=widgets.Container( + [sel_project, sel_app_session, button, report_model_benchmark, pbar, sec_pbar] + ), )