jonas commited on
Commit
94cb986
1 Parent(s): 71d49e1

Update README.md

Browse files

Changed model loading example to make it workable on local machines if people clone the repo.

Files changed (1) hide show
  1. README.md +4 -2
README.md CHANGED
@@ -32,12 +32,14 @@ You can use the raw model for object detection on cashew images.
32
 
33
  ```python
34
  import torch
 
35
 
36
  # load model
37
- model = torch.hub.load('ultralytics/yolov5', 'KaraAgroAI/CADI-AI')
 
38
 
39
  # Images
40
- img = ['/path/to/CADI-AI-image.jpg']# batch of images
41
 
42
  # set model parameters
43
  # set Non-Maximum-Suppression(NMS) threshold to define
 
32
 
33
  ```python
34
  import torch
35
+ import ultralytics
36
 
37
  # load model
38
+ model = torch.hub.load("ultralytics/yolov5", "custom", path="yolov5_0.65map_exp7_best.pt",
39
+ force_reload=False)
40
 
41
  # Images
42
+ img = ['/path/to/your_image.jpg']# batch of images
43
 
44
  # set model parameters
45
  # set Non-Maximum-Suppression(NMS) threshold to define