muk42 commited on
Commit
7d75537
·
1 Parent(s): 9eeb4b4

return two values

Browse files
Files changed (1) hide show
  1. inference_tab/inference_logic.py +14 -7
inference_tab/inference_logic.py CHANGED
@@ -25,18 +25,25 @@ yolo_weights = hf_hub_download(
25
 
26
  def run_inference(image_path, gcp_path, city_name, score_th):
27
  # ==== TEXT DETECTION ====
28
- yield from getBBoxes(image_path)
29
- yield from getSegments(image_path)
30
- yield from extractSegments(image_path)
 
 
 
31
 
32
  # === TEXT RECOGNITION ===
33
- yield from blobsOCR(image_path)
 
34
 
35
  # === ADD GEO DATA ===
36
  MASK_PATH = os.path.join(OUTPUT_DIR,"mask.tif")
37
- yield from georefImg(MASK_PATH, gcp_path)
38
- yield from extractCentroids(image_path)
39
- yield from extractStreetNet(city_name)
 
 
 
40
 
41
  # === POST OCR ===
42
  for msg in fuzzyMatch():
 
25
 
26
  def run_inference(image_path, gcp_path, city_name, score_th):
27
  # ==== TEXT DETECTION ====
28
+ for msg in getBBoxes(image_path):
29
+ yield msg, None
30
+ for msg in getSegments(image_path):
31
+ yield msg, None
32
+ for msg in extractSegments(image_path):
33
+ yield msg, None
34
 
35
  # === TEXT RECOGNITION ===
36
+ for msg in blobsOCR(image_path):
37
+ yield msg, None
38
 
39
  # === ADD GEO DATA ===
40
  MASK_PATH = os.path.join(OUTPUT_DIR,"mask.tif")
41
+ for msg in georefImg(MASK_PATH, gcp_path):
42
+ yield msg, None
43
+ for msg in extractCentroids(image_path):
44
+ yield msg, None
45
+ for msg in extractStreetNet(city_name):
46
+ yield msg, None
47
 
48
  # === POST OCR ===
49
  for msg in fuzzyMatch():