Realcat commited on
Commit
5808772
1 Parent(s): 4a7fc02

update: diable gr.info notice

Browse files
Files changed (1) hide show
  1. common/utils.py +7 -7
common/utils.py CHANGED
@@ -463,7 +463,6 @@ def run_ransac(
463
  ransac_confidence=ransac_confidence,
464
  ransac_max_iter=ransac_max_iter,
465
  )
466
- gr.Info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
467
  logger.info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
468
  t1 = time.time()
469
 
@@ -475,7 +474,6 @@ def run_ransac(
475
  output_matches_ransac, num_matches_ransac = display_matches(
476
  state_cache, titles=titles, tag="KPTS_RANSAC"
477
  )
478
- gr.Info(f"Display matches done using: {time.time()-t1:.3f}s")
479
  logger.info(f"Display matches done using: {time.time()-t1:.3f}s")
480
  t1 = time.time()
481
  num_matches_raw = state_cache["num_matches_raw"]
@@ -561,7 +559,7 @@ def run_matching(
561
  else:
562
  matcher = get_model(match_conf)
563
  models_already_loaded[cache_key] = matcher
564
- gr.Info(f"Loading model using: {time.time()-t0:.3f}s")
565
  logger.info(f"Loading model using: {time.time()-t0:.3f}s")
566
  t1 = time.time()
567
 
@@ -593,7 +591,9 @@ def run_matching(
593
  )
594
  pred = match_features.match_images(matcher, pred0, pred1)
595
  del extractor
596
- gr.Info(f"Matching images done using: {time.time()-t1:.3f}s")
 
 
597
  logger.info(f"Matching images done using: {time.time()-t1:.3f}s")
598
  t1 = time.time()
599
  # plot images with keypoints\
@@ -627,7 +627,7 @@ def run_matching(
627
  ransac_confidence=ransac_confidence,
628
  ransac_max_iter=ransac_max_iter,
629
  )
630
- gr.Info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
631
  logger.info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
632
  t1 = time.time()
633
 
@@ -639,7 +639,7 @@ def run_matching(
639
  output_matches_ransac, num_matches_ransac = display_matches(
640
  pred, titles=titles, tag="KPTS_RANSAC"
641
  )
642
- gr.Info(f"Display matches done using: {time.time()-t1:.3f}s")
643
  logger.info(f"Display matches done using: {time.time()-t1:.3f}s")
644
 
645
  t1 = time.time()
@@ -653,8 +653,8 @@ def run_matching(
653
  )
654
  plt.close("all")
655
  # del pred
 
656
  logger.info(f"TOTAL time: {time.time()-t0:.3f}s")
657
- gr.Info(f"In summary, total time: {time.time()-t0:.3f}s")
658
 
659
  state_cache = pred
660
  state_cache["num_matches_raw"] = num_matches_raw
 
463
  ransac_confidence=ransac_confidence,
464
  ransac_max_iter=ransac_max_iter,
465
  )
 
466
  logger.info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
467
  t1 = time.time()
468
 
 
474
  output_matches_ransac, num_matches_ransac = display_matches(
475
  state_cache, titles=titles, tag="KPTS_RANSAC"
476
  )
 
477
  logger.info(f"Display matches done using: {time.time()-t1:.3f}s")
478
  t1 = time.time()
479
  num_matches_raw = state_cache["num_matches_raw"]
 
559
  else:
560
  matcher = get_model(match_conf)
561
  models_already_loaded[cache_key] = matcher
562
+ # gr.Info(f"Loading model using: {time.time()-t0:.3f}s")
563
  logger.info(f"Loading model using: {time.time()-t0:.3f}s")
564
  t1 = time.time()
565
 
 
591
  )
592
  pred = match_features.match_images(matcher, pred0, pred1)
593
  del extractor
594
+ gr.Info(
595
+ f"Matching images done using: {time.time()-t1:.3f}s",
596
+ )
597
  logger.info(f"Matching images done using: {time.time()-t1:.3f}s")
598
  t1 = time.time()
599
  # plot images with keypoints\
 
627
  ransac_confidence=ransac_confidence,
628
  ransac_max_iter=ransac_max_iter,
629
  )
630
+ # gr.Info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
631
  logger.info(f"RANSAC matches done using: {time.time()-t1:.3f}s")
632
  t1 = time.time()
633
 
 
639
  output_matches_ransac, num_matches_ransac = display_matches(
640
  pred, titles=titles, tag="KPTS_RANSAC"
641
  )
642
+ # gr.Info(f"Display matches done using: {time.time()-t1:.3f}s")
643
  logger.info(f"Display matches done using: {time.time()-t1:.3f}s")
644
 
645
  t1 = time.time()
 
653
  )
654
  plt.close("all")
655
  # del pred
656
+ # gr.Info(f"In summary, total time: {time.time()-t0:.3f}s")
657
  logger.info(f"TOTAL time: {time.time()-t0:.3f}s")
 
658
 
659
  state_cache = pred
660
  state_cache["num_matches_raw"] = num_matches_raw