Sync crowd-detection from metro-analytics-catalog
Browse files- README.md +2 -2
- export_and_quantize.sh +15 -2
README.md
CHANGED
|
@@ -116,8 +116,8 @@ Output files:
|
|
| 116 |
|
| 117 |
### OpenVINO Sample
|
| 118 |
|
| 119 |
-
The sample below runs YOLO26 inference, filters to the `person` class,
|
| 120 |
-
|
| 121 |
|
| 122 |
```python
|
| 123 |
import cv2
|
|
|
|
| 116 |
|
| 117 |
### OpenVINO Sample
|
| 118 |
|
| 119 |
+
The sample below runs YOLO26 inference, filters to the `person` class, and
|
| 120 |
+
reports the crowd count for a single image.
|
| 121 |
|
| 122 |
```python
|
| 123 |
import cv2
|
export_and_quantize.sh
CHANGED
|
@@ -31,11 +31,24 @@ fi
|
|
| 31 |
|
| 32 |
echo "--- Installing dependencies ---"
|
| 33 |
if [[ "${PRECISION}" == "INT8" ]]; then
|
| 34 |
-
pip install -qU
|
| 35 |
else
|
| 36 |
-
pip install -qU
|
| 37 |
fi
|
| 38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
echo "--- Downloading sample test image ---"
|
| 40 |
if [[ ! -f test.jpg ]]; then
|
| 41 |
wget -q -O test.jpg https://ultralytics.com/images/bus.jpg
|
|
|
|
| 31 |
|
| 32 |
echo "--- Installing dependencies ---"
|
| 33 |
if [[ "${PRECISION}" == "INT8" ]]; then
|
| 34 |
+
pip install -qU openvino nncf ultralytics
|
| 35 |
else
|
| 36 |
+
pip install -qU openvino ultralytics
|
| 37 |
fi
|
| 38 |
|
| 39 |
+
# Ask for approval before downloading models and sample files
|
| 40 |
+
echo ""
|
| 41 |
+
echo "This script will download:"
|
| 42 |
+
echo " - YOLO26 model weights (if not cached locally)"
|
| 43 |
+
echo " - Sample test image and video files"
|
| 44 |
+
echo ""
|
| 45 |
+
read -p "Continue with downloads? (yes/no): " APPROVAL
|
| 46 |
+
if [[ "${APPROVAL}" != "yes" ]]; then
|
| 47 |
+
echo "Download cancelled by user."
|
| 48 |
+
exit 0
|
| 49 |
+
fi
|
| 50 |
+
echo ""
|
| 51 |
+
|
| 52 |
echo "--- Downloading sample test image ---"
|
| 53 |
if [[ ! -f test.jpg ]]; then
|
| 54 |
wget -q -O test.jpg https://ultralytics.com/images/bus.jpg
|