vagheshpatel commited on
Commit
48392c3
·
verified ·
1 Parent(s): 9da8ed7

Sync object-detection from metro-analytics-catalog

Browse files
README.md CHANGED
@@ -127,26 +127,20 @@ import cv2
127
  import numpy as np
128
  import openvino as ov
129
 
130
- COCO_NAMES = [
131
- "person","bicycle","car","motorcycle","airplane","bus","train","truck",
132
- "boat","traffic light","fire hydrant","stop sign","parking meter","bench",
133
- "bird","cat","dog","horse","sheep","cow","elephant","bear","zebra",
134
- "giraffe","backpack","umbrella","handbag","tie","suitcase","frisbee",
135
- "skis","snowboard","sports ball","kite","baseball bat","baseball glove",
136
- "skateboard","surfboard","tennis racket","bottle","wine glass","cup",
137
- "fork","knife","spoon","bowl","banana","apple","sandwich","orange",
138
- "broccoli","carrot","hot dog","pizza","donut","cake","chair","couch",
139
- "potted plant","bed","dining table","toilet","tv","laptop","mouse",
140
- "remote","keyboard","cell phone","microwave","oven","toaster","sink",
141
- "refrigerator","book","clock","vase","scissors","teddy bear","hair drier",
142
- "toothbrush",
143
- ]
144
  CONF_THRESHOLD = 0.4
145
  INPUT_SIZE = 640
146
 
147
  core = ov.Core()
148
  model = core.read_model("yolo26n_openvino_model/yolo26n.xml")
149
 
 
 
 
 
 
 
 
 
150
  # Change device to "GPU" or "NPU" to run on integrated GPU or NPU.
151
  compiled = core.compile_model(model, "CPU")
152
 
 
127
  import numpy as np
128
  import openvino as ov
129
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  CONF_THRESHOLD = 0.4
131
  INPUT_SIZE = 640
132
 
133
  core = ov.Core()
134
  model = core.read_model("yolo26n_openvino_model/yolo26n.xml")
135
 
136
+ # YOLO26 embeds the 80 COCO class names in rt_info -- read them instead of
137
+ # hardcoding the list. Ultralytics separates multi-word names with
138
+ # underscores (e.g. "traffic_light"), so restore spaces for display.
139
+ COCO_NAMES = [
140
+ name.replace("_", " ")
141
+ for name in model.get_rt_info()["model_info"]["labels"].value.split()
142
+ ]
143
+
144
  # Change device to "GPU" or "NPU" to run on integrated GPU or NPU.
145
  compiled = core.compile_model(model, "CPU")
146
 
expected_output_dlstreamer.gif CHANGED

Git LFS Details

  • SHA256: db02d0c6a136c017e181241fd242cbbb1d4d3cb5e5cb9be3ea10e5cfeed1cdd7
  • Pointer size: 133 Bytes
  • Size of remote file: 19.2 MB

Git LFS Details

  • SHA256: 36e30e34c3f01db83e7f50f832c90dcb66b4a867e1dfebeed0c99d4ce44cc0fc
  • Pointer size: 133 Bytes
  • Size of remote file: 19.1 MB
expected_output_openvino.jpg CHANGED

Git LFS Details

  • SHA256: c28135338b04e5826cba22950cdc84f56e1c3b642f6cda5d6de30dd0de50d180
  • Pointer size: 131 Bytes
  • Size of remote file: 349 kB

Git LFS Details

  • SHA256: 434445b1dba5e36e5b354ff4dc2a9ed9a5560d06ac5606b8966d8704e9448cdf
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
export_and_quantize.sh CHANGED
@@ -54,17 +54,6 @@ if [[ ! -f test.jpg ]]; then
54
  else
55
  echo "Already present: test.jpg"
56
  fi
57
-
58
- # Ask for approval before downloading models and sample files
59
- echo ""
60
- echo "This script will download:"
61
- echo " - Model weights and/or sample files"
62
- echo ""
63
- read -p "Continue with downloads? (yes/no): " APPROVAL
64
- if [[ "${APPROVAL}" != "yes" ]]; then
65
- echo "Download cancelled by user."
66
- exit 0
67
- fi
68
  echo ""
69
  echo "--- Downloading sample test video ---"
70
  if [[ ! -f test_video.mp4 ]]; then
 
54
  else
55
  echo "Already present: test.jpg"
56
  fi
 
 
 
 
 
 
 
 
 
 
 
57
  echo ""
58
  echo "--- Downloading sample test video ---"
59
  if [[ ! -f test_video.mp4 ]]; then