MikkoLipsanen commited on
Commit
e1cac1f
·
verified ·
1 Parent(s): e32b9e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -38,7 +38,7 @@ Default settings were used for other training hyperparameters (find more informa
38
 
39
  Model training was performed using the following code:
40
 
41
- ```
42
  from ultralytics import YOLO
43
 
44
  # Use pretrained Yolo segmentation model
@@ -55,7 +55,7 @@ model.train(data=yaml_path, name='model_name', epochs=100, imgsz=640, workers=4,
55
 
56
  Evaluation results using the validation dataset are listed below:
57
  |Class|Images|Class instances|Box precision|Box recall|Box mAP50|Box mAP50-95|Mask precision|Mask recall|Mask mAP50|Mask mAP50-95
58
- -|-|-|-|-|-|-|-|-|-|-
59
  Text line|574|43156|0.912|0.888|0.949|0.701|0.935|0.907|0.954|0.55
60
 
61
  More information on the performance metrics can be found [here](https://docs.ultralytics.com/guides/yolo-performance-metrics/).
@@ -65,11 +65,11 @@ More information on the performance metrics can be found [here](https://docs.ult
65
  If the model file `tuomiokirja_lines_05122023.pt` is downloaded to a folder `\models\tuomiokirja_lines_05122023.pt`
66
  and the input image path is `\data\image.jpg', inference can be perfomed using the following code:
67
 
68
- ```
69
  from ultralytics import YOLO
70
 
71
  # Initialize model
72
- model = YOLO(`\models\tuomiokirja_lines_05122023.pt`)
73
- prediction_results = model.predict(source=`\data\image.jpg', save=True)
74
  ```
75
  More information for available inference arguments can be found [here](https://docs.ultralytics.com/modes/predict/#inference-arguments).
 
38
 
39
  Model training was performed using the following code:
40
 
41
+ ```python
42
  from ultralytics import YOLO
43
 
44
  # Use pretrained Yolo segmentation model
 
55
 
56
  Evaluation results using the validation dataset are listed below:
57
  |Class|Images|Class instances|Box precision|Box recall|Box mAP50|Box mAP50-95|Mask precision|Mask recall|Mask mAP50|Mask mAP50-95
58
+ |:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|:----|
59
  Text line|574|43156|0.912|0.888|0.949|0.701|0.935|0.907|0.954|0.55
60
 
61
  More information on the performance metrics can be found [here](https://docs.ultralytics.com/guides/yolo-performance-metrics/).
 
65
  If the model file `tuomiokirja_lines_05122023.pt` is downloaded to a folder `\models\tuomiokirja_lines_05122023.pt`
66
  and the input image path is `\data\image.jpg', inference can be perfomed using the following code:
67
 
68
+ ```python
69
  from ultralytics import YOLO
70
 
71
  # Initialize model
72
+ model = YOLO('\models\tuomiokirja_lines_05122023.pt')
73
+ prediction_results = model.predict(source='\data\image.jpg', save=True)
74
  ```
75
  More information for available inference arguments can be found [here](https://docs.ultralytics.com/modes/predict/#inference-arguments).