Update README.md
Browse files
README.md
CHANGED
@@ -9,7 +9,6 @@ Rehosted from https://hf.co/mayrajeo/marine-vessel-yolo using the following code
|
|
9 |
import os
|
10 |
import hashlib
|
11 |
|
12 |
-
import torch
|
13 |
import ultralytics
|
14 |
|
15 |
url = "https://hf.co/mayrajeo/marine-vessel-yolo/resolve/main/yolo11s_tci.pt"
|
@@ -27,7 +26,8 @@ print(model.args)
|
|
27 |
|
28 |
# save and compute hash
|
29 |
filename = "yolo11s_sentinel2_rgb_marine_vessel_detection.pt"
|
30 |
-
|
|
|
31 |
md5 = hashlib.md5(open(filename, "rb").read()).hexdigest()[:8]
|
32 |
os.rename(filename, filename.replace(".pt", f"-{md5}.pt"))
|
33 |
|
|
|
9 |
import os
|
10 |
import hashlib
|
11 |
|
|
|
12 |
import ultralytics
|
13 |
|
14 |
url = "https://hf.co/mayrajeo/marine-vessel-yolo/resolve/main/yolo11s_tci.pt"
|
|
|
26 |
|
27 |
# save and compute hash
|
28 |
filename = "yolo11s_sentinel2_rgb_marine_vessel_detection.pt"
|
29 |
+
model.ckpt = model.state_dict()
|
30 |
+
model.save(filename)
|
31 |
md5 = hashlib.md5(open(filename, "rb").read()).hexdigest()[:8]
|
32 |
os.rename(filename, filename.replace(".pt", f"-{md5}.pt"))
|
33 |
|