derekalia commited on
Commit
4020710
·
1 Parent(s): 864d214

update 323

Browse files
Files changed (1) hide show
  1. app.py +1 -10
app.py CHANGED
@@ -80,16 +80,7 @@ def process(
80
  ocr_bbox_rslt, is_goal_filtered = check_ocr_box(image_save_path, display_img = False, output_bb_format='xyxy', goal_filtering=None, easyocr_args={'paragraph': False, 'text_threshold':0.9}, use_paddleocr=True)
81
  text, ocr_bbox = ocr_bbox_rslt
82
  # print('prompt:', prompt)
83
- dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(image_path, som_model,
84
- BOX_TRESHOLD = BOX_TRESHOLD,
85
- output_coord_in_ratio=False,
86
- ocr_bbox=ocr_bbox,
87
- draw_bbox_config=draw_bbox_config,
88
- caption_model_processor=caption_model_processor,
89
- ocr_text=text,
90
- use_local_semantics=True,
91
- iou_threshold=0.1)
92
-
93
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
94
  print('finish processing')
95
 
 
80
  ocr_bbox_rslt, is_goal_filtered = check_ocr_box(image_save_path, display_img = False, output_bb_format='xyxy', goal_filtering=None, easyocr_args={'paragraph': False, 'text_threshold':0.9}, use_paddleocr=True)
81
  text, ocr_bbox = ocr_bbox_rslt
82
  # print('prompt:', prompt)
83
+ dino_labled_img, label_coordinates, parsed_content_list = get_som_labeled_img(image_save_path, yolo_model, BOX_TRESHOLD = box_threshold, output_coord_in_ratio=False, ocr_bbox=ocr_bbox,draw_bbox_config=draw_bbox_config, caption_model_processor=caption_model_processor, ocr_text=text,iou_threshold=iou_threshold)
 
 
 
 
 
 
 
 
 
84
  image = Image.open(io.BytesIO(base64.b64decode(dino_labled_img)))
85
  print('finish processing')
86