thomaskk2024 commited on
Commit
dfdeef0
·
verified ·
1 Parent(s): e30aaf3

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. miner.py +5 -5
  2. weights.onnx +2 -2
miner.py CHANGED
@@ -34,7 +34,7 @@ class Miner:
34
  # (ships inside weights.onnx), so a retrained model with a different class
35
  # order is remapped correctly without code changes. This static list is used
36
  # only when that metadata is missing or unparsable.
37
- model_class_names = ["balaclava", "hoodie", "glove", "bat", "spray paint", "graffiti"]
38
 
39
  input_size = 1280
40
 
@@ -50,13 +50,14 @@ class Miner:
50
  max_det = 150
51
 
52
  _conf_thres_array = np.array(
53
- [0.25, 0.26, 0.22, 0.21, 0.3, 0.28], dtype=np.float32,
54
  )
55
  _bonus_array = np.array(
56
- [0.05, 0.04, 0.04, 0.01, 0.08, 0.08], dtype=np.float32,
57
  )
58
-
59
  def __init__(self, path_hf_repo: Path) -> None:
 
60
  model_path = path_hf_repo / "weights.onnx"
61
  print("ORT version:", ort.__version__)
62
 
@@ -141,7 +142,6 @@ class Miner:
141
 
142
  def _read_model_class_order(self) -> "list[str] | None":
143
  """Read the model's class order from Ultralytics ONNX metadata.
144
-
145
  Returns the class names ordered by model-emit index, or None when the
146
  metadata is missing/unparsable or doesn't match `class_names` as a set
147
  (in which case the static model_class_names fallback is used)."""
 
34
  # (ships inside weights.onnx), so a retrained model with a different class
35
  # order is remapped correctly without code changes. This static list is used
36
  # only when that metadata is missing or unparsable.
37
+ model_class_names = ["balaclava", "bat", "glove", "graffiti", "hoodie", "spray paint"]
38
 
39
  input_size = 1280
40
 
 
50
  max_det = 150
51
 
52
  _conf_thres_array = np.array(
53
+ [0.38, 0.42, 0.22, 0.12, 0.33, 0.20], dtype=np.float32,
54
  )
55
  _bonus_array = np.array(
56
+ [0.2, 0.25, 0.12, 0.09, 0.21, 0.06], dtype=np.float32,
57
  )
58
+
59
  def __init__(self, path_hf_repo: Path) -> None:
60
+ # model_path = path_hf_repo / "weights-all.onnx"
61
  model_path = path_hf_repo / "weights.onnx"
62
  print("ORT version:", ort.__version__)
63
 
 
142
 
143
  def _read_model_class_order(self) -> "list[str] | None":
144
  """Read the model's class order from Ultralytics ONNX metadata.
 
145
  Returns the class names ordered by model-emit index, or None when the
146
  metadata is missing/unparsable or doesn't match `class_names` as a set
147
  (in which case the static model_class_names fallback is used)."""
weights.onnx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f9ff74df8edf5ed276720ed2ac42dafd8e9994d1bacb94d215bab1068b8e3cbc
3
- size 9809125
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a9705e464e581151416bd2dffc5b4dc7ff1cc4f3b899fee82aeb692a004a9e2e
3
+ size 9809235