dkagramanyan commited on
Commit
e144d41
1 Parent(s): 5095bc8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -1
README.md CHANGED
@@ -30,6 +30,7 @@ pip install ultralytics
30
  ```
31
  from ultralytics import YOLO
32
  from huggingface_hub import hf_hub_download
 
33
 
34
  # Load the weights from our repository
35
  model_path = hf_hub_download(local_dir=".",
@@ -41,8 +42,13 @@ model = YOLO(model_path)
41
  test_blank_path = hf_hub_download(local_dir=".",
42
  repo_id="armvectores/yolov8n_handwritten_text_detection",
43
  filename="test_blank.png")
 
44
  # Do the predictions
45
- model.predict(source=test_blank, save=True, show=True, show_labels=False, show_conf=False, conf=0.3)
 
 
 
 
46
  ```
47
 
48
 
 
30
  ```
31
  from ultralytics import YOLO
32
  from huggingface_hub import hf_hub_download
33
+ from matplotlib import pyplot as plt
34
 
35
  # Load the weights from our repository
36
  model_path = hf_hub_download(local_dir=".",
 
42
  test_blank_path = hf_hub_download(local_dir=".",
43
  repo_id="armvectores/yolov8n_handwritten_text_detection",
44
  filename="test_blank.png")
45
+
46
  # Do the predictions
47
+ res = model.predict(source=test_blank_path, project='.',name='detected', exist_ok=True, save=True, show=False, show_labels=False, show_conf=False, conf=0.5, )
48
+
49
+ plt.figure(figsize=(15,10))
50
+ plt.imshow(plt.imread('detected/test_blank.png'))
51
+ plt.show()
52
  ```
53
 
54