Update README.md
Browse files
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 |
-
|
28 |
-
|
29 |
result_image = draw_boxes(image, outputs[0]["boxes"])
|
30 |
-
|
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 |
```
|