Skip to content

Commit b90b52c

Browse files
committed
v1.5.13
1 parent 83c3e38 commit b90b52c

File tree

11 files changed

+146
-14
lines changed

11 files changed

+146
-14
lines changed

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Release Notes
22

3+
## v1.5.13
4+
5+
- ALPRDemo: improve UI experience, fix README typos
6+
37
## v1.5.12
48

59
- ALPRDemo increase docker compose compatibility

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v1.5.12
1+
v1.5.13

deployment-examples/ALPRDemo/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Contact [[email protected]](mailto:[email protected]) with any questio
4040
* Source for it is in `./ui/python`
4141
* Can (and perhaps should) be ran remotely relatively to the docker-compose.
4242
* Make sure to install requirements with `pip3 install -r ./ui/python/requirements.txt`
43-
* Then run with `cd ./ui/python && python3 ALPRDemo.py`
43+
* Then run with `cd ./ui/python && python3 ALPRUI.py`
4444

4545
## General
4646

@@ -59,4 +59,14 @@ If you have an NVIDIA GPU installed and properly configured, you can run the fol
5959
SIO_DOCKER_RUNTIME=nvidia docker compose up -d
6060
```
6161

62+
## OS Compatibility
63+
64+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
65+
66+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
67+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
68+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
69+
* `-amd64` for x86 based systems
70+
71+
This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.
6272

deployment-examples/ALPRDemo/docker-compose.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,23 @@ services:
3030
- SIO_DATA_DIR=/data/.sio
3131
# We need this to see output from Python extension module
3232
- PYTHONUNBUFFERED=1
33+
# Way to force specific inference runtime on platforms supporting more than one.
34+
# D3V for OpenVino, D3T for TensorRT, D3F for TFLite
35+
# - SIO_INFERENCE_RUNTIME=D3V
36+
# Detection mode for platforms and engines supporting more than one: 16 for fp16, 8 for int8
37+
# TensorRT and OpenVino only.
38+
# - SIO_INFERENCE_MODE=16
39+
# Timeout (ms) at which inference will be executed, even if the batch isn't full.
40+
# Longer values increase delays, but decrease GPU load.
41+
# TensorRT only.
42+
# - SIO_INFERENCE_MAX_INTERBATCH_DELAY=40
43+
# Disabling NPP can be useful on systems, where GPU is overloaded (and thus should be preserved for inference),
44+
# and a lot of CPU resources are available. Use with care.
45+
# NVidia platforms only.
46+
# - SIO_NPP_ENABLE=1
47+
# Configured inference batch size. Changing this value will result in re-creating CUDA engine for all the models.
48+
# TensorRT only
49+
# - SIO_TENSORRT_RUNTIME_BATCH=16
3350
# Container runtime defaults to `runc` if SIO_DOCKER_RUNTIME not set. Use `nvidia` if GPU is installed.
3451
runtime: ${SIO_DOCKER_RUNTIME-runc}
3552
volumes:

deployment-examples/ALPRDemo/ui/python/ALPRUI.py

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from datetime import datetime
1515
from SIOParser import SIOParser
1616

17+
kDefaultTimeout = 5
18+
1719
def epoch_to_offset(epoch_timestamp):
1820
return datetime.utcfromtimestamp(epoch_timestamp/1000).strftime('%H:%M:%S')
1921

@@ -74,6 +76,7 @@ def onSave(self, event):
7476
self.settings["api_port"] = self.port_text.GetValue()
7577
self.settings["refresh_rate"] = int(self.refresh_rate_text.GetValue())
7678
self.settings["max_entries"] = int(self.max_entries_text.GetValue())
79+
self.settings["timeout"] = kDefaultTimeout
7780
self.EndModal(wx.ID_OK)
7881
except ValueError:
7982
wx.MessageBox("Please enter valid values for all fields.", "Error", wx.OK | wx.ICON_ERROR)
@@ -90,10 +93,12 @@ def __init__(self, *args, **kw):
9093
"api_ip": "10.10.10.20",
9194
"api_port": "8888",
9295
"refresh_rate": 10,
93-
"max_entries": 50
96+
"max_entries": 50,
97+
"timeout": 10,
9498
}
9599

96100
self.data = None
101+
self.updating = False
97102

98103
self.initUI()
99104
self.Center()
@@ -212,7 +217,7 @@ def onUpload(self,event):
212217
files = {'file': (os.path.basename(filepath), f)}
213218
uri = f"{self.apiRoot()}/folderwatch/upload/us"
214219

215-
response = requests.post(uri, files=files)
220+
response = requests.post(uri, files=files, timeout=self.settings['timeout'])
216221

217222
# Check response status
218223
if response.status_code != 200:
@@ -228,10 +233,24 @@ def onUpload(self,event):
228233
self.uploaded_files_list.InsertItem(idx, filepath)
229234
self.uploaded_files_list.SetItem(idx, 1, id)
230235
self.uploaded_files_list.SetItem(idx, 2, "Uploaded")
231-
236+
except requests.exceptions.ConnectionError:
237+
self.handleTimeout()
238+
except requests.Timeout:
239+
self.handleTimeout()
232240
except Exception as e:
233241
wx.MessageBox(f"An error occurred: {str(e)}", "Error", wx.OK | wx.ICON_ERROR)
234242

243+
# =========================================================================
244+
def handleTimeout(self):
245+
result = wx.MessageBox(f"Timeout reached communicating to {self.settings['api_ip']}. Do you want to modify settings?", "Update settings?", wx.YES_NO | wx.ICON_QUESTION)
246+
247+
# Check the response
248+
if result == wx.YES:
249+
shouldStart = self.auto_refresh
250+
self.stopAutoRefresh()
251+
self.onSettings(None)
252+
if shouldStart:
253+
self.startAutoRefresh()
235254

236255
# =========================================================================
237256
def onTabChanged(self,event):
@@ -401,10 +420,14 @@ def populateRemoteFrame(self, index):
401420

402421
uri = f"{self.apiRoot()}/plates/image/{src}"
403422
try:
404-
response = requests.get(uri,params={'id':id})
423+
response = requests.get(uri, params={'id':id}, timeout=self.settings['timeout'])
405424
if response.status_code != 200:
406425
raise Exception(f"Error {response.status_code} retrieving latest results from {uri}")
407426
self.updateImage(response.content, response.headers['Content-Type'], box)
427+
except requests.exceptions.ConnectionError:
428+
self.handleTimeout()
429+
except requests.Timeout:
430+
self.handleTimeout()
408431
except Exception as e:
409432
print(f"Error updating image contents: {e}")
410433
self.clearImage(self.image_ctrl)
@@ -469,6 +492,9 @@ def apiRoot(self):
469492

470493
# =========================================================================
471494
def updateFileTab(self):
495+
if self.updating:
496+
return
497+
self.updating = True
472498
item_count = self.uploaded_files_list.GetItemCount()
473499
for i in range(item_count):
474500
item_file = self.uploaded_files_list.GetItemText(i)
@@ -484,10 +510,17 @@ def updateFileTab(self):
484510

485511
uri = f"{self.apiRoot()}/folderwatch/status/{item_id}"
486512

487-
response = requests.get(uri)
513+
try:
514+
response = requests.get(uri, timeout=self.settings['timeout'])
515+
except requests.exceptions.ConnectionError:
516+
self.handleTimeout()
517+
except requests.Timeout:
518+
self.handleTimeout()
519+
response = None
520+
488521

489522
# Check response status
490-
if response.status_code != 200:
523+
if not response or response.status_code != 200:
491524
self.uploaded_files_list.SetItem(i,2,"error")
492525
continue
493526

@@ -498,19 +531,29 @@ def updateFileTab(self):
498531
if status == "completed":
499532
result = j.get("result","")
500533
self.uploaded_files_results[item_file] = result
534+
self.updating = False
535+
501536

502537

503538
# =========================================================================
504539
def updateCurrentTab(self):
540+
if self.updating:
541+
return
542+
self.updating = True
505543
try:
506-
response = requests.get(f"{self.apiRoot()}/plates/latest/{self.settings['max_entries']}")
544+
response = requests.get(f"{self.apiRoot()}/plates/latest/{self.settings['max_entries']}",
545+
timeout=self.settings['timeout'])
507546
if response.status_code != 200:
508547
raise Exception(f"Error {response.status_code} retrieving latest results")
509-
return
510548
self.data = response.json()
511549
self.populateListWithData(self.data, self.list_box, False)
550+
except requests.exceptions.ConnectionError:
551+
self.handleTimeout()
552+
except requests.Timeout:
553+
self.handleTimeout()
512554
except Exception as e:
513555
print(f"Error updating current tab: {e}")
556+
self.updating = False
514557

515558
# =========================================================================
516559
def onRefreshCurrent(self, event):
@@ -557,11 +600,15 @@ def onSearch(self, event):
557600
if end:
558601
uri = uri + f"/{end}"
559602
try:
560-
response = requests.get(uri, params=params)
603+
response = requests.get(uri, params=params, timeout=self.settings['timeout'])
561604
if response.status_code != 200:
562605
raise Exception(f"Error {response.status_code} retrieving search results")
563606
self.data = response.json()
564607
self.populateListWithData(self.data, self.list_box, False)
608+
except requests.exceptions.ConnectionError:
609+
self.handleTimeout()
610+
except requests.Timeout:
611+
self.handleTimeout()
565612
except Exception as e:
566613
wx.MessageBox(f"Error updating search tab: {e}", "Error", wx.OK | wx.ICON_ERROR)
567614

deployment-examples/SIOOnDemandAnalytics/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,14 @@ REST API Flask module is bringing it all together, providing a front-end impleme
1515
## Client
1616

1717
A sample client is implemented in `SIOOnDemandAnalytics/clients/OnDemandTest.py`.
18-
The client can be ran using `python3 ./clients/OnDemandTest.py [-i inputImage] [-o outputFolder]`
18+
The client can be ran using `python3 ./clients/OnDemandTest.py [-i inputImage] [-o outputFolder]`
19+
20+
## OS Compatibility
21+
22+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
23+
24+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
25+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
26+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
27+
* `-amd64` for x86 based systems
28+

deployment-examples/SighthoundRestApiGateway/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,14 @@ We recommend using the UI Demo for development purposes only, and it should be r
3434
## Request and Response
3535

3636
See the [online documentation](https://dev.sighthound.com/cloud-api/docs/quickstart/docker/#request-format) for details on the request/response formats and code samples.
37+
38+
## OS Compatibility
39+
40+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
41+
42+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
43+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
44+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
45+
* `-amd64` for x86 based systems
46+
47+
This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.

deployment-examples/StandaloneSIOWithExtension/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,13 @@ camera deployed in such non-deterministic way - thus assuming that monitoring th
4343
ensures we're not going to analyze objects outside of the bottom right quadrant ROI (`lp_roiFilter` accomplishes that), and won't analyze objects below size threshold (`vehicle_SizeFilter`
4444
and `lp_SizeFilter` filters accomplish that).
4545

46+
47+
## OS Compatibility
48+
49+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
50+
51+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
52+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
53+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
54+
* `-amd64` for x86 based systems
55+

deployment-examples/VideoStreamsConsumer/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,15 @@ Once the services are up and running, start the client sample with a `docker com
4040

4141
The following client samples are available for this deployment:
4242

43-
* `SIOOutput` - simple AMQP client listening for and consuming SIO output from the message queue
43+
* `SIOOutput` - simple AMQP client listening for and consuming SIO output from the message queue
44+
45+
## OS Compatibility
46+
47+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
48+
49+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
50+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
51+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
52+
* `-amd64` for x86 based systems
53+
54+
This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.

deployment-examples/VideoStreamsRecorder/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,15 @@ SIO_DOCKER_RUNTIME=nvidia SIO_DOCKER_TAG_VARIANT="-r32.7.3-arm64v8" docker-compo
3939

4040
Once the services are up and running, start the client sample with a `docker compose up` command while inside the relevant sample's folder in `./clients/python/`
4141

42+
43+
## OS Compatibility
44+
45+
`SIO_DOCKER_TAG_VARIANT` environment variable used in `docker-compose` controls the flavor of SIO analytics container image. While on x86 systems thing largely work without setting it, on Jetson-based system, set it to the value most compatible with your base OS.
46+
47+
* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
48+
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
49+
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
50+
* `-amd64` for x86 based systems
51+
52+
This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.
53+

0 commit comments

Comments
 (0)