@@ -77,7 +77,7 @@ def __init__(
7777 overlap_x = 25 ,
7878 overlap_y = 25 ,
7979 show_crops = False ,
80- show_processing_status = True ,
80+ show_processing_status = False ,
8181 resize_initial_size = True ,
8282 model = None ,
8383 memory_optimize = True ,
@@ -91,7 +91,7 @@ def __init__(
9191 self ._progress_bars = {}
9292
9393 # Set up the progress callback based on parameters
94- if progress_callback is not None :
94+ if progress_callback is not None and show_processing_status :
9595 self .progress_callback = progress_callback
9696 elif show_processing_status :
9797 self .progress_callback = self ._tqdm_callback
@@ -293,6 +293,11 @@ def _detect_objects_batch(self):
293293 """
294294 crops , batch = self .crops
295295 self .crops = crops
296+
297+ # Call the progress callback function if provided
298+ if self .progress_callback is not None :
299+ self .progress_callback ("Detecting objects in batch" , 0 , 1 )
300+
296301 self ._calculate_batch_inference (
297302 batch ,
298303 self .crops ,
@@ -310,6 +315,10 @@ def _detect_objects_batch(self):
310315 if self .resize_initial_size :
311316 crop .resize_results ()
312317
318+ # Call the progress callback function if provided
319+ if self .progress_callback is not None :
320+ self .progress_callback ("Detecting objects in batch" , 1 , 1 )
321+
313322 def _calculate_batch_inference (
314323 self ,
315324 batch ,
0 commit comments