nehulagrawal commited on
Commit
74e99f1
1 Parent(s): 135ddb4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -97,6 +97,8 @@ pip install ultralyticsplus==0.0.28 ultralytics==8.0.43
97
 
98
  ```python
99
  from ultralyticsplus import YOLO, render_result
 
 
100
 
101
  # load model
102
  model = YOLO('foduucom/Tyre-Quality-Classification-AI')
@@ -108,13 +110,14 @@ model.overrides['agnostic_nms'] = False # NMS class-agnostic
108
  model.overrides['max_det'] = 1000 # maximum number of detections per image
109
 
110
  # set image
111
- image = '/path/to/your/document/image'
112
 
113
  # perform inference
114
- results = model.predict(image)
 
115
 
116
  # observe results
117
- top_class_index = results[0].probs.top1
118
  Class = model.names[top_class_index]
119
  print(Class)
120
 
 
97
 
98
  ```python
99
  from ultralyticsplus import YOLO, render_result
100
+ import torch
101
+
102
 
103
  # load model
104
  model = YOLO('foduucom/Tyre-Quality-Classification-AI')
 
110
  model.overrides['max_det'] = 1000 # maximum number of detections per image
111
 
112
  # set image
113
+ image = '/content/90-100-10-ceat-500x500.jpeg'
114
 
115
  # perform inference
116
+ results = model(image)
117
+
118
 
119
  # observe results
120
+ top_class_index = torch.argmax(results[0].probs).item()
121
  Class = model.names[top_class_index]
122
  print(Class)
123