Skip to content

Commit

Permalink
v1.5.13
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 8, 2024
1 parent 83c3e38 commit b90b52c
Show file tree
Hide file tree
Showing 11 changed files with 146 additions and 14 deletions.
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release Notes

## v1.5.13

- ALPRDemo: improve UI experience, fix README typos

## v1.5.12

- ALPRDemo increase docker compose compatibility
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.5.12
v1.5.13
12 changes: 11 additions & 1 deletion deployment-examples/ALPRDemo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Contact [[email protected]](mailto:[email protected]) with any questio
* Source for it is in `./ui/python`
* Can (and perhaps should) be ran remotely relatively to the docker-compose.
* Make sure to install requirements with `pip3 install -r ./ui/python/requirements.txt`
* Then run with `cd ./ui/python && python3 ALPRDemo.py`
* Then run with `cd ./ui/python && python3 ALPRUI.py`

## General

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

## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.

17 changes: 17 additions & 0 deletions deployment-examples/ALPRDemo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@ services:
- SIO_DATA_DIR=/data/.sio
# We need this to see output from Python extension module
- PYTHONUNBUFFERED=1
# Way to force specific inference runtime on platforms supporting more than one.
# D3V for OpenVino, D3T for TensorRT, D3F for TFLite
# - SIO_INFERENCE_RUNTIME=D3V
# Detection mode for platforms and engines supporting more than one: 16 for fp16, 8 for int8
# TensorRT and OpenVino only.
# - SIO_INFERENCE_MODE=16
# Timeout (ms) at which inference will be executed, even if the batch isn't full.
# Longer values increase delays, but decrease GPU load.
# TensorRT only.
# - SIO_INFERENCE_MAX_INTERBATCH_DELAY=40
# Disabling NPP can be useful on systems, where GPU is overloaded (and thus should be preserved for inference),
# and a lot of CPU resources are available. Use with care.
# NVidia platforms only.
# - SIO_NPP_ENABLE=1
# Configured inference batch size. Changing this value will result in re-creating CUDA engine for all the models.
# TensorRT only
# - SIO_TENSORRT_RUNTIME_BATCH=16
# Container runtime defaults to `runc` if SIO_DOCKER_RUNTIME not set. Use `nvidia` if GPU is installed.
runtime: ${SIO_DOCKER_RUNTIME-runc}
volumes:
Expand Down
65 changes: 56 additions & 9 deletions deployment-examples/ALPRDemo/ui/python/ALPRUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from datetime import datetime
from SIOParser import SIOParser

kDefaultTimeout = 5

def epoch_to_offset(epoch_timestamp):
return datetime.utcfromtimestamp(epoch_timestamp/1000).strftime('%H:%M:%S')

Expand Down Expand Up @@ -74,6 +76,7 @@ def onSave(self, event):
self.settings["api_port"] = self.port_text.GetValue()
self.settings["refresh_rate"] = int(self.refresh_rate_text.GetValue())
self.settings["max_entries"] = int(self.max_entries_text.GetValue())
self.settings["timeout"] = kDefaultTimeout
self.EndModal(wx.ID_OK)
except ValueError:
wx.MessageBox("Please enter valid values for all fields.", "Error", wx.OK | wx.ICON_ERROR)
Expand All @@ -90,10 +93,12 @@ def __init__(self, *args, **kw):
"api_ip": "10.10.10.20",
"api_port": "8888",
"refresh_rate": 10,
"max_entries": 50
"max_entries": 50,
"timeout": 10,
}

self.data = None
self.updating = False

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

response = requests.post(uri, files=files)
response = requests.post(uri, files=files, timeout=self.settings['timeout'])

# Check response status
if response.status_code != 200:
Expand All @@ -228,10 +233,24 @@ def onUpload(self,event):
self.uploaded_files_list.InsertItem(idx, filepath)
self.uploaded_files_list.SetItem(idx, 1, id)
self.uploaded_files_list.SetItem(idx, 2, "Uploaded")

except requests.exceptions.ConnectionError:
self.handleTimeout()
except requests.Timeout:
self.handleTimeout()
except Exception as e:
wx.MessageBox(f"An error occurred: {str(e)}", "Error", wx.OK | wx.ICON_ERROR)

# =========================================================================
def handleTimeout(self):
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)

# Check the response
if result == wx.YES:
shouldStart = self.auto_refresh
self.stopAutoRefresh()
self.onSettings(None)
if shouldStart:
self.startAutoRefresh()

# =========================================================================
def onTabChanged(self,event):
Expand Down Expand Up @@ -401,10 +420,14 @@ def populateRemoteFrame(self, index):

uri = f"{self.apiRoot()}/plates/image/{src}"
try:
response = requests.get(uri,params={'id':id})
response = requests.get(uri, params={'id':id}, timeout=self.settings['timeout'])
if response.status_code != 200:
raise Exception(f"Error {response.status_code} retrieving latest results from {uri}")
self.updateImage(response.content, response.headers['Content-Type'], box)
except requests.exceptions.ConnectionError:
self.handleTimeout()
except requests.Timeout:
self.handleTimeout()
except Exception as e:
print(f"Error updating image contents: {e}")
self.clearImage(self.image_ctrl)
Expand Down Expand Up @@ -469,6 +492,9 @@ def apiRoot(self):

# =========================================================================
def updateFileTab(self):
if self.updating:
return
self.updating = True
item_count = self.uploaded_files_list.GetItemCount()
for i in range(item_count):
item_file = self.uploaded_files_list.GetItemText(i)
Expand All @@ -484,10 +510,17 @@ def updateFileTab(self):

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

response = requests.get(uri)
try:
response = requests.get(uri, timeout=self.settings['timeout'])
except requests.exceptions.ConnectionError:
self.handleTimeout()
except requests.Timeout:
self.handleTimeout()
response = None


# Check response status
if response.status_code != 200:
if not response or response.status_code != 200:
self.uploaded_files_list.SetItem(i,2,"error")
continue

Expand All @@ -498,19 +531,29 @@ def updateFileTab(self):
if status == "completed":
result = j.get("result","")
self.uploaded_files_results[item_file] = result
self.updating = False



# =========================================================================
def updateCurrentTab(self):
if self.updating:
return
self.updating = True
try:
response = requests.get(f"{self.apiRoot()}/plates/latest/{self.settings['max_entries']}")
response = requests.get(f"{self.apiRoot()}/plates/latest/{self.settings['max_entries']}",
timeout=self.settings['timeout'])
if response.status_code != 200:
raise Exception(f"Error {response.status_code} retrieving latest results")
return
self.data = response.json()
self.populateListWithData(self.data, self.list_box, False)
except requests.exceptions.ConnectionError:
self.handleTimeout()
except requests.Timeout:
self.handleTimeout()
except Exception as e:
print(f"Error updating current tab: {e}")
self.updating = False

# =========================================================================
def onRefreshCurrent(self, event):
Expand Down Expand Up @@ -557,11 +600,15 @@ def onSearch(self, event):
if end:
uri = uri + f"/{end}"
try:
response = requests.get(uri, params=params)
response = requests.get(uri, params=params, timeout=self.settings['timeout'])
if response.status_code != 200:
raise Exception(f"Error {response.status_code} retrieving search results")
self.data = response.json()
self.populateListWithData(self.data, self.list_box, False)
except requests.exceptions.ConnectionError:
self.handleTimeout()
except requests.Timeout:
self.handleTimeout()
except Exception as e:
wx.MessageBox(f"Error updating search tab: {e}", "Error", wx.OK | wx.ICON_ERROR)

Expand Down
12 changes: 11 additions & 1 deletion deployment-examples/SIOOnDemandAnalytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,14 @@ REST API Flask module is bringing it all together, providing a front-end impleme
## Client

A sample client is implemented in `SIOOnDemandAnalytics/clients/OnDemandTest.py`.
The client can be ran using `python3 ./clients/OnDemandTest.py [-i inputImage] [-o outputFolder]`
The client can be ran using `python3 ./clients/OnDemandTest.py [-i inputImage] [-o outputFolder]`

## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

11 changes: 11 additions & 0 deletions deployment-examples/SighthoundRestApiGateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,14 @@ We recommend using the UI Demo for development purposes only, and it should be r
## Request and Response

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.

## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.
10 changes: 10 additions & 0 deletions deployment-examples/StandaloneSIOWithExtension/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,13 @@ camera deployed in such non-deterministic way - thus assuming that monitoring th
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`
and `lp_SizeFilter` filters accomplish that).


## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

13 changes: 12 additions & 1 deletion deployment-examples/VideoStreamsConsumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,15 @@ Once the services are up and running, start the client sample with a `docker com

The following client samples are available for this deployment:

* `SIOOutput` - simple AMQP client listening for and consuming SIO output from the message queue
* `SIOOutput` - simple AMQP client listening for and consuming SIO output from the message queue

## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.
12 changes: 12 additions & 0 deletions deployment-examples/VideoStreamsRecorder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,15 @@ SIO_DOCKER_RUNTIME=nvidia SIO_DOCKER_TAG_VARIANT="-r32.7.3-arm64v8" docker-compo

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/`


## OS Compatibility

`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.

* `-r32.4.3-arm64v8` (built for hardware running Jetpack 4.4)
* `-r32.7.3-arm64v8` (built for hardware running Jetpack 4.6)
* `-r35.3.1-arm64v8` (work in progress, built for hardware running Jetpack 5.1)
* `-amd64` for x86 based systems

This variable may already be pre-set in more recent releases of ShOS / on Sighthound devices.

2 changes: 1 addition & 1 deletion docs/schemas/anypipe/anypipe.html
Original file line number Diff line number Diff line change
Expand Up @@ -5515,7 +5515,7 @@ <h2 class="mb-0">
<a href="https://github.com/coveooss/json-schema-for-humans">
json-schema-for-humans
</a>
on 2024-09-17 at 18:23:29 +0000
on 2024-11-08 at 23:24:49 +0000
</p>
</footer>
</body>
Expand Down

0 comments on commit b90b52c

Please sign in to comment.