Skip to content

Commit 2705fcc

Browse files
committed
docs: Update README
1 parent 133e0b4 commit 2705fcc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,15 @@ pip install rapid-layout
5555

5656
```python
5757
import cv2
58+
from imread_from_url import imread_from_url # pip install imread_from_url
5859

5960
from rapid_layout import RapidLayout, VisLayout
6061

6162
# model_type类型参见上表。指定不同model_type时,会自动下载相应模型到安装目录下的。
6263
layout_engine = RapidLayout(model_type="doclayout_yolo", conf_thres=0.2)
6364

64-
img_path = "tests/test_files/financial.jpg"
65-
img = cv2.imread(img_path)
65+
img_url = "https://raw.githubusercontent.com/opendatalab/DocLayout-YOLO/refs/heads/main/assets/example/financial.jpg"
66+
img = imread_from_url(img_url)
6667

6768
boxes, scores, class_names, elapse = layout_engine(img)
6869
ploted_img = VisLayout.draw_detections(img, boxes, scores, class_names)

0 commit comments

Comments
 (0)