File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,15 @@ pip install rapid-layout
5555
5656``` python
5757import cv2
58+ from imread_from_url import imread_from_url # pip install imread_from_url
5859
5960from rapid_layout import RapidLayout, VisLayout
6061
6162# model_type类型参见上表。指定不同model_type时,会自动下载相应模型到安装目录下的。
6263layout_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
6768boxes, scores, class_names, elapse = layout_engine(img)
6869ploted_img = VisLayout.draw_detections(img, boxes, scores, class_names)
You can’t perform that action at this time.
0 commit comments