yujunhui3 commited on
Commit
88b5754
1 Parent(s): e3a8bc9

“update”

Browse files
Files changed (2) hide show
  1. README.md +7 -1
  2. README_EN.md +6 -0
README.md CHANGED
@@ -37,8 +37,14 @@ pipeline_tag: object-detection
37
 
38
  result = model(image_path, save=True, conf=0.5, save_crop=False, line_width=2)
39
  print(result)
 
 
 
 
 
 
40
  ```
41
-
42
 
43
 
44
  ## 三、版面分析
 
37
 
38
  result = model(image_path, save=True, conf=0.5, save_crop=False, line_width=2)
39
  print(result)
40
+
41
+ print(result[0].names) # 输出id2label map
42
+ print(result[0].boxes) # 输出所有的检测到的bounding box
43
+ print(result[0].boxes.xyxy) # 输出所有的检测到的bounding box的左上和右下坐标
44
+ print(result[0].boxes.cls) # 输出所有的检测到的bounding box类别对应的id
45
+ print(result[0].boxes.conf) # 输出所有的检测到的bounding box的置信度
46
  ```
47
+
48
 
49
 
50
  ## 三、版面分析
README_EN.md CHANGED
@@ -27,6 +27,12 @@ In this open source project, we have prioritized the development of lightweight
27
 
28
  result = model(image_path, save=True, conf=0.5, save_crop=False, line_width=2)
29
  print(result)
 
 
 
 
 
 
30
  ```
31
 
32
  ## III. Layout Analysis
 
27
 
28
  result = model(image_path, save=True, conf=0.5, save_crop=False, line_width=2)
29
  print(result)
30
+
31
+ print(result[0].names) # Output the id to label map
32
+ print(result[0].boxes) # Output all detected bounding boxes
33
+ print(result[0].boxes.xyxy) # Output the top-left and bottom-right coordinates of all detected bounding boxes
34
+ print(result[0].boxes.cls) # Output the id corresponding to the class of all detected bounding boxes
35
+ print(result[0].boxes.conf) # Output the confidence of all detected bounding boxes
36
  ```
37
 
38
  ## III. Layout Analysis