Explorar o código

feat: add logging for detection time in BatchAnalyze when OCR is not applied

Suven hai 11 meses
pai
achega
be01039495
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      magic_pdf/model/batch_analyze.py

+ 2 - 0
magic_pdf/model/batch_analyze.py

@@ -191,6 +191,8 @@ class BatchAnalyze:
 
         if self.model.apply_ocr:
             logger.info(f"ocr time: {round(ocr_time, 2)}, image num: {ocr_count}")
+        else:
+            logger.info(f"det time: {round(ocr_time, 2)}, image num: {ocr_count}")
         if self.model.apply_table:
             logger.info(f"table time: {round(table_time, 2)}, image num: {table_count}")