arxyzan commited on
Commit
736b870
1 Parent(s): e48fe65

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -5
README.md CHANGED
@@ -18,14 +18,13 @@ with the [Hezar](https://github.com/hezarai/hezar) package (**>=v0.40.0**).
18
  pip install hezar[vision]
19
  ```
20
  ```python
21
- import cv2
22
  from hezar.models import Model
23
- from hezar.utils import draw_boxes
24
 
25
 
26
  model = Model.load("hezarai/CRAFT", device="cuda")
27
- outputs = model.predict("../assets/text_detection_example.png")
28
- image = cv2.imread("../assets/text_detection_example.png")
29
  result_image = draw_boxes(image, outputs[0]["boxes"])
30
- cv2.imwrite("detected.png", result_image)
31
  ```
 
18
  pip install hezar[vision]
19
  ```
20
  ```python
 
21
  from hezar.models import Model
22
+ from hezar.utils import load_image, draw_boxes, show_image
23
 
24
 
25
  model = Model.load("hezarai/CRAFT", device="cuda")
26
+ image = load_image("../assets/text_detection_example.jpg")
27
+ outputs = model.predict(image)
28
  result_image = draw_boxes(image, outputs[0]["boxes"])
29
+ show_image(result_image, "text_detected")
30
  ```