fangjiasheng 3 gadi atpakaļ
vecāks
revīzija
39df147134
2 mainītis faili ar 16 papildinājumiem un 12 dzēšanām
  1. 8 4
      format_convert/utils.py
  2. 8 8
      result.html

+ 8 - 4
format_convert/utils.py

@@ -960,7 +960,7 @@ class LineTable():
             for table_line in _table:
             for table_line in _table:
                 for _cell in table_line:
                 for _cell in table_line:
                     if self.inbox(textbox.bbox,_cell["bbox"]):
                     if self.inbox(textbox.bbox,_cell["bbox"]):
-                        _cell["text"]+= _text
+                        _cell["text"] += _text
                         in_objs.add(textbox)
                         in_objs.add(textbox)
                         _find = True
                         _find = True
                         break
                         break
@@ -1012,8 +1012,12 @@ class LineTable():
     def getIOU(self, bbox0, bbox1):
     def getIOU(self, bbox0, bbox1):
         width = max(bbox0[2],bbox1[2])-min(bbox0[0],bbox1[0])-(bbox0[2]-bbox0[0]+bbox1[2]-bbox1[0])
         width = max(bbox0[2],bbox1[2])-min(bbox0[0],bbox1[0])-(bbox0[2]-bbox0[0]+bbox1[2]-bbox1[0])
         height = max(bbox0[3],bbox1[3])-min(bbox0[1],bbox1[1])-(bbox0[3]-bbox0[1]+bbox1[3]-bbox1[1])
         height = max(bbox0[3],bbox1[3])-min(bbox0[1],bbox1[1])-(bbox0[3]-bbox0[1]+bbox1[3]-bbox1[1])
-        if width<0 and height<0:
-            return abs(width*height/min(abs((bbox0[2]-bbox0[0])*(bbox0[3]-bbox0[1])),abs((bbox1[2]-bbox1[0])*(bbox1[3]-bbox1[1]))))
+        print("getIOU", width, height)
+        if width < 0 and height < 0:
+            iou = abs(width*height/min(abs((bbox0[2]-bbox0[0])*(bbox0[3]-bbox0[1])),
+                                       abs((bbox1[2]-bbox1[0])*(bbox1[3]-bbox1[1]))))
+            print("getIOU", iou)
+            return iou
         return 0
         return 0
 
 
     def getspan(self, _list, x0, x1, margin):
     def getspan(self, _list, x0, x1, margin):
@@ -1037,7 +1041,7 @@ class LineTable():
         #     plt.scatter(point.get("point")[0],point.get("point")[1])
         #     plt.scatter(point.get("point")[0],point.get("point")[1])
         for textbox in list_textbox:
         for textbox in list_textbox:
             x0, y0, x1, y1 = textbox.bbox
             x0, y0, x1, y1 = textbox.bbox
-            plt.Rectangle(([x0, x1], [y0, y1]))
+            plt.plot([x0, x1], [y0, y1])
         plt.show()
         plt.show()
 
 
 
 

+ 8 - 8
result.html

@@ -1,9 +1,9 @@
 <!DOCTYPE HTML><head><meta charset="UTF-8"></head><body><table border="1">
 <!DOCTYPE HTML><head><meta charset="UTF-8"></head><body><table border="1">
 <tr>
 <tr>
-<td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
+<td colspan=1 rowspan=1>件件详见附件详见附详见附品牌单价规格型号数量司72.3500中标金额(万元)</td>
+<td colspan=1 rowspan=1>购置赁有限公司机械设备租华池县卓泰供应商名称名称四、主要标的信息设备租赁有限公华池县卓泰机械供应商名称三、中标(成交)信息二、项目名称HCZC2021-0001、项目编号</td>
+<td colspan=1 rowspan=1>六、代理服务收费标准及金额:设项目配套设备庄肉牛养殖场建货物类远镇张川村供应商联系地址</td>
+<td colspan=1 rowspan=1>王正刚、段海龙、李鑫、刘翠平、张武峰详见附件华池县柔远镇李甘肃省庆阳市华池县柔</td>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
 </tr>
 </tr>
 <tr>
 <tr>
@@ -12,7 +12,7 @@
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
+<td colspan=1 rowspan=1>五、评审专家(单一来源采购人员)名单:</td>
 </tr>
 </tr>
 <tr>
 <tr>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>
@@ -25,9 +25,9 @@
 </table>
 </table>
 <table border="1">
 <table border="1">
 <tr>
 <tr>
-<td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
-<td colspan=1 rowspan=1></td>
+<td colspan=1 rowspan=1>件件详见附件详见附件详见附详见附品牌单价规格型号名称数量货物类远镇张川村72.3500供应商联系地址中标金额(万元)</td>
+<td colspan=1 rowspan=1>赁有限公司机械设备租华池县卓泰供应商名称司供应商名称二、项目名称、项目编号</td>
+<td colspan=1 rowspan=1>六、代理服务收费标准及金额:王正刚、段海龙、李鑫、刘翠平、张武峰购置设项目配套设备庄肉牛养殖场建华池县柔远镇李四、主要标的信息设备租赁有限公华池县卓泰机械三、中标(成交)信息HCZC2021-0001</td>
 </tr>
 </tr>
 <tr>
 <tr>
 <td colspan=1 rowspan=1></td>
 <td colspan=1 rowspan=1></td>