diff --git a/geti_sdk/benchmarking/benchmarker.py b/geti_sdk/benchmarking/benchmarker.py index f36564114..bce2f3323 100644 --- a/geti_sdk/benchmarking/benchmarker.py +++ b/geti_sdk/benchmarking/benchmarker.py @@ -859,7 +859,7 @@ def compare_predictions( with open(throughput_benchmark_results, "r") as results_file: throughput_benchmark_results = list(csv.DictReader(results_file)) - visusalizer = Visualizer() + visualizer = Visualizer() # Performe inferece with logging_redirect_tqdm(tqdm_class=tqdm): @@ -892,7 +892,7 @@ def compare_predictions( f"failed. Inference failed with error: `{e}`" ) if success: - image_with_prediction = visusalizer.draw(image, prediction) + image_with_prediction = visualizer.draw(image, prediction) image_with_prediction = cv2.cvtColor( image_with_prediction, cv2.COLOR_BGR2RGB ) @@ -953,7 +953,7 @@ def compare_predictions( if include_online_prediction_for_active_model: logging.info("Predicting on the platform using the active model") online_prediction_result = self._predict_using_active_model(image) - image_with_prediction = visusalizer.draw( + image_with_prediction = visualizer.draw( image, online_prediction_result["prediction"] ) image_with_prediction = cv2.cvtColor( diff --git a/tests/pre-merge/unit/benchmarking/test_benchmarker.py b/tests/pre-merge/unit/benchmarking/test_benchmarker.py index 51bbc5d6c..14afa9521 100644 --- a/tests/pre-merge/unit/benchmarking/test_benchmarker.py +++ b/tests/pre-merge/unit/benchmarking/test_benchmarker.py @@ -357,8 +357,8 @@ def test_compare_predictions( _ = mocker.patch( "geti_sdk.benchmarking.benchmarker.cv2.putText", ) - mock_show_image_with_annotation_scene = mocker.patch( - "geti_sdk.benchmarking.benchmarker.show_image_with_annotation_scene", + mock_visualizer_draw = mocker.patch( + "geti_sdk.benchmarking.benchmarker.Visualizer.draw", return_value=mock_image, ) mock_pad_image_and_put_caption = mocker.patch( @@ -393,7 +393,7 @@ def test_compare_predictions( mock_image ) assert ( - mock_show_image_with_annotation_scene.call_count + mock_visualizer_draw.call_count == mock_pad_image_and_put_caption.call_count == ( # Calls for deployments + online prediction call