Skip to content

Commit

Permalink
Update S3 Bucket (audio-orcasound-net) + Deploy all hydrophones (#196)
Browse files Browse the repository at this point in the history
* Update from streaming-orcasound-net to audio-orcasound-net bucket

* Updated bucket version and re-deployed all 5 hydrophones

* Update Readme for InferenceSystem
  • Loading branch information
tanviraja24 committed Sep 19, 2024
1 parent 8968412 commit b08be3d
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 24 deletions.
6 changes: 3 additions & 3 deletions InferenceSystem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ python src/LiveInferenceOrchestrator.py --config ./config/Test/FastAI_LiveHLS_Or
You should see the following logs in your terminal. Since this is a Test config, no audio is uploaded to Azure and no metadata is written to CosmosDB.

```
Listening to location https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab
Listening to location https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_orcasound_lab
Downloading live879.ts
live879.ts: 205kB [00:00, 1.17MB/s]
Downloading live880.ts
Expand Down Expand Up @@ -190,7 +190,7 @@ docker run --rm -it --env-file .env live-inference-system
In addition, you should see something similar to the following in your console.

```
Listening to location https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab
Listening to location https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_orcasound_lab
Downloading live879.ts
live879.ts: 205kB [00:00, 1.17MB/s]
Downloading live880.ts
Expand Down Expand Up @@ -384,5 +384,5 @@ export PODCAST_AZURE_STORAGE_CONNECTION_STRING="<copied-connection-string>"
Call the script as follows, substituting appropriate values.

```
python PrepareDataForPredictionExplorer.py --start_time "2020-07-25 19:15" --end_time "2020-07-25 20:15" --s3_stream https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab --model_path <folder> --annotation_threshold 0.4 --round_id round5 --dataset_folder <path-to-folder>
python PrepareDataForPredictionExplorer.py --start_time "2020-07-25 19:15" --end_time "2020-07-25 20:15" --s3_stream https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_orcasound_lab --model_path <folder> --annotation_threshold 0.4 --round_id round5 --dataset_folder <path-to-folder>
```
8 changes: 4 additions & 4 deletions InferenceSystem/demos/hls_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
import spectrogram_visualizer

ORCASOUND_STREAMS = {
# 'OrcasoundLab': 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab'
'BushPoint': 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_bush_point'
# 'PortTownsend': 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_port_townsend'
'SunsetBay': 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_sunset_bay'
# 'OrcasoundLab': 'https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_orcasound_lab'
'BushPoint': 'https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_bush_point'
# 'PortTownsend': 'https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_port_townsend'
'SunsetBay': 'https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_sunset_bay'
}

dirname = os.getcwd()
Expand Down
10 changes: 5 additions & 5 deletions InferenceSystem/deploy-aci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ properties:
secureValue: '<storage_connection_string>'
- name: INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING
secureValue: '<appinsights_connection_string>'
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.OrcasoundLab.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.OrcasoundLab.v0
ports: []
resources:
requests:
Expand All @@ -29,7 +29,7 @@ properties:
secureValue: '<storage_connection_string>'
- name: INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING
secureValue: '<appinsights_connection_string>'
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.PortTownsend.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.PortTownsend.v0
ports: []
resources:
requests:
Expand All @@ -44,7 +44,7 @@ properties:
secureValue: '<storage_connection_string>'
- name: INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING
secureValue: '<appinsights_connection_string>'
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.BushPoint.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-19-24.FastAI.R1-12.BushPoint.v0
ports: []
resources:
requests:
Expand All @@ -59,7 +59,7 @@ properties:
secureValue: '<storage_connection_string>'
- name: INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING
secureValue: '<appinsights_connection_string>'
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.SunsetBay.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-19-24.FastAI.R1-12.SunsetBay.v0
ports: []
resources:
requests:
Expand All @@ -74,7 +74,7 @@ properties:
secureValue: '<storage_connection_string>'
- name: INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING
secureValue: '<appinsights_connection_string>'
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.PointRobinson.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.PointRobinson.v0
ports: []
resources:
requests:
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/deploy/bush-point.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: inference-system
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.BushPoint.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-19-24.FastAI.R1-12.BushPoint.v0
resources:
limits:
cpu: 1
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/deploy/orcasound-lab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: inference-system
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.OrcasoundLab.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.OrcasoundLab.v0
resources:
limits:
cpu: 1
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/deploy/point-robinson.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: inference-system
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.PointRobinson.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.PointRobinson.v0
resources:
limits:
cpu: 1
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/deploy/port-townsend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: inference-system
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.PortTownsend.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-18-24.FastAI.R1-12.PortTownsend.v0
resources:
limits:
cpu: 1
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/deploy/sunset-bay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: inference-system
image: orcaconservancycr.azurecr.io/live-inference-system:11-15-20.FastAI.R1-12.SunsetBay.v0
image: orcaconservancycr.azurecr.io/live-inference-system:09-19-24.FastAI.R1-12.SunsetBay.v0
resources:
limits:
cpu: 1
Expand Down
2 changes: 1 addition & 1 deletion InferenceSystem/misc/notesOnHLSConversion.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The relevant bucket tonight was a directory with the UNIX timestamp 1543804333,

mkdir 20181202_1920-humpback-biggs_OrcasoundLab
cd 20181202_1920-humpback-biggs_OrcasoundLab/
aws s3 sync s3://streaming-orcasound-net/rpi_orcasound_lab/hls/1543804333 .
aws s3 sync s3://audio-orcasound-net/rpi_orcasound_lab/hls/1543804333 .
printf "file '%s'\n" ./*.ts > mylist.txt
ffmpeg -f concat -safe 0 -i mylist.txt -c copy all.ts
ffmpeg -i all.ts -c:v libx264 -c:a copy -bsf:a aac_adtstoasc output.mp4
Expand Down
3 changes: 2 additions & 1 deletion InferenceSystem/src/LiveInferenceOrchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def populate_metadata_json(

# logger to app insights
app_insights_connection_string = os.getenv('INFERENCESYSTEM_APPINSIGHTS_CONNECTION_STRING')
print("INSTRUMENTATION KEY: ", app_insights_connection_string)
logger = logging.getLogger(__name__)
if app_insights_connection_string is not None:
logger.addHandler(AzureLogHandler(connection_string=app_insights_connection_string))
Expand Down Expand Up @@ -142,7 +143,7 @@ def populate_metadata_json(
hls_stream_type = config_params["hls_stream_type"]
hls_polling_interval = config_params["hls_polling_interval"]
hls_hydrophone_id = config_params["hls_hydrophone_id"]
hydrophone_stream_url = 'https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/' + hls_hydrophone_id
hydrophone_stream_url = 'https://s3-us-west-2.amazonaws.com/audio-orcasound-net/' + hls_hydrophone_id

if hls_stream_type == "LiveHLS":
hls_stream = HLSStream(hydrophone_stream_url, hls_polling_interval, local_dir)
Expand Down
10 changes: 5 additions & 5 deletions InferenceSystem/src/globals.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import datetime

S3_STREAM_URLS = {
"orcasound_lab": "https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_orcasound_lab",
"port_townsend": "https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_port_townsend",
"bush_point": "https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_bush_point",
"sunset_bay": "https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_sunset_bay",
"point_robinson": "https://s3-us-west-2.amazonaws.com/streaming-orcasound-net/rpi_point_robinson",
"orcasound_lab": "https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_orcasound_lab",
"port_townsend": "https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_port_townsend",
"bush_point": "https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_bush_point",
"sunset_bay": "https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_sunset_bay",
"point_robinson": "https://s3-us-west-2.amazonaws.com/audio-orcasound-net/rpi_point_robinson",
}

# Limits time window (end - start) of negative samples to be downloaded for retraining
Expand Down

0 comments on commit b08be3d

Please sign in to comment.