Skip to content

Demo grosse conf #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
60ad75d
Add: two cams with trigger
Andre-AMALOR-RAJ Dec 24, 2024
06c2ce7
array index out of range, error fix
Andre-AMALOR-RAJ Dec 26, 2024
225177c
clean unused function
Dec 27, 2024
93d5046
update docker compose and add logger
Dec 27, 2024
493af62
add linter
Dec 27, 2024
f55ef66
adding basic app
LouisonR-octo Dec 31, 2024
0d20696
update streamlit and add config file
Jan 10, 2025
049d3fb
update app basic
Jan 10, 2025
d806a9e
rebase main
Jan 14, 2025
1104fbe
update inventory
Jan 14, 2025
6bb1137
update readme with setup for the edge
Jan 15, 2025
35238ff
update branch name
Jan 15, 2025
4548768
renaming
Feb 3, 2025
d36c3f6
update readme
Feb 3, 2025
2640e52
rollback
Feb 13, 2025
eab5e1f
add ansible_user as env variable
Feb 13, 2025
1b08f7a
[fix] update inventory file
Feb 17, 2025
445fb0a
[fix] docker compose naming
Feb 28, 2025
43d390c
[fix] make duck detection works on new orchestrator version
Feb 28, 2025
bb4e8c8
adding duck config with fake cameras
LouisonR-octo Mar 12, 2025
5d763a0
adding duck tflite model
LouisonR-octo Mar 12, 2025
2b41531
fixing tests
LouisonR-octo Mar 12, 2025
a02191b
fixing tests
LouisonR-octo Mar 12, 2025
b61ea5d
review
Mar 17, 2025
490ec3d
adding USB camera
LouisonR-octo Mar 17, 2025
63b288a
fixing classes
LouisonR-octo Mar 17, 2025
85b8e97
adding fake ducks pictures
LouisonR-octo Mar 18, 2025
7cce400
remove conf
Mar 18, 2025
ab60a94
fixing configs
LouisonR-octo Mar 18, 2025
c60b1be
fixing src
LouisonR-octo Mar 18, 2025
0f80c6e
fixing config name
LouisonR-octo Mar 18, 2025
4ed4b45
fixing creds
LouisonR-octo Mar 18, 2025
2491b38
edit classes
LouisonR-octo Mar 18, 2025
ff79b7b
remove copy models on tflite_serving
Mar 18, 2025
02843ac
simplify class names
Mar 18, 2025
aaf3bbe
clean
Mar 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ vio-edge-up:

.PHONY: vio-up ## 🐳 Start all edge services (db, model_serving, orchestrator, interface) and hubs (monitoring, monitoring_db, labelizer)
vio-up:
BUILDOS=${BUILDOS} docker compose --profile hub --profile edge up -d --build
BUILDOS=${BUILDOS} docker compose --profile hub --profile edge up -d

.PHONY: vio-down ## ❌ Stop all services (model_serving, edge_orchestrator, ui)
vio-down:
Expand Down
2 changes: 1 addition & 1 deletion deployment/edge/ansible/deploy_vio_on_edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
repo: https://github.com/octo-technology/VIO.git
dest: "{{ REMOTE_VIO_DIR }}"
single_branch: yes
version: main
version: demo-grosse-conf
force: true

- name: Remove config folder
Expand Down
2 changes: 1 addition & 1 deletion deployment/edge/ansible/files/docker-compose.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ services:
SERVING_MODEL_URL: http://edge_model_serving:8501
GOOGLE_APPLICATION_CREDENTIALS: /edge_orchestrator/config/secrets/credentials.json
BUCKET_NAME: tf-vio-bucket
ACTIVE_CONFIG_NAME: marker_classification_with_1_fake_camera
ACTIVE_CONFIG_NAME: duck_detection_gcp_with_2_usbcamera

edge_interface:
container_name: edge_interface
Expand Down
10 changes: 5 additions & 5 deletions deployment/edge/ansible/inventory.ini
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[edge_1]
10.103.252.192 ansible_user=devkit ansible_password=devkit
172.23.26.98 ansible_user=octo ansible_password=devkit

[edge_1:vars]
EDGE_NAME="edge1"
IP_ADDRESS="10.103.252.192"
IP_ADDRESS="172.23.26.98"

[edge_2]
10.103.253.2 ansible_user=devkit ansible_password=devkit
172.23.26.10 ansible_user=devkit ansible_password=devkit

[edge_2:vars]
EDGE_NAME="edge2"
IP_ADDRESS="10.103.253.2"
IP_ADDRESS="172.23.26.10"

; [localhost]
; 127.0.0.1
Expand All @@ -21,6 +21,6 @@ IP_ADDRESS="10.103.253.2"

[all:vars]
LOCAL_VIO_DIR={{ lookup('env', 'LOCAL_VIO_DIR') }}
REMOTE_VIO_DIR="/home/devkit/vio"
REMOTE_VIO_DIR="/home/{{ ansible_user }}/vio"
GCP_VIO_BUCKET="tf-vio-bucket"
GCP_VIO_PROJECT="acn-gcp-octo-sas"
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ services:
EDGE_ORCHESTRATOR_URL: http://edge_orchestrator:8000
profiles: [hub]

edge_interface:
extends:
file: edge_interface/edge_interface.yml
service: edge_interface
# edge_interface:
# extends:
# file: edge_interface/edge_interface.yml
# service: edge_interface

hub_streamlit:
container_name: hub_streamlit
Expand Down
Binary file not shown.
2 changes: 2 additions & 0 deletions edge_model_serving/models/tflite/duck_detection/labels.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0 K0
1 OK
2 changes: 1 addition & 1 deletion edge_model_serving/tflite_serving/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$TARGETPLATFORM python:3.10-slim AS builder

Check warning on line 1 in edge_model_serving/tflite_serving/Dockerfile

View workflow job for this annotation

GitHub Actions / build_and_push_images (./edge_model_serving/tflite_serving/Dockerfile, ghcr.io/octo-technology/VI... / Build and push Docker images to multiple registries

Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior

RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior More info: https://docs.docker.com/go/dockerfile/rule/redundant-target-platform/
ARG TARGETPLATFORM
ARG BUILDOS

Expand All @@ -25,7 +25,7 @@
COPY tflite_serving/pyproject.toml ./
COPY tflite_serving/src/ ./src
COPY tflite_serving/pip.conf /opt/venv/pip.conf
COPY models/tflite/ $MODELS_PATH/tflite/
# COPY models/tflite/ $MODELS_PATH/tflite/

RUN pip install --no-cache-dir .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def test_get_home_should_return_link_to_docs(self):
assert actual_response.status_code == 200
assert actual_response.json() == expected_message

def test_get_models_should_return_4_models(self):
def test_get_models_should_return_6_models(self):
# Given
model_url = f"{self.base_url}/models"
expected_models = [
"duck_detection",
"marker_quality_control",
"mobilenet_ssd_v2_coco",
"mobilenet_ssd_v2_face",
Expand Down
2 changes: 1 addition & 1 deletion edge_orchestrator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ RUN pip install --no-cache-dir --upgrade pip setuptools

COPY pip.conf /opt/venv/pip.conf
COPY pyproject.toml ./
COPY config ./config
# COPY config ./config
COPY fake_images ./fake_images
COPY model_labels ./model_labels
COPY src/ ./src
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"station_name": "data_gathering_with_1_usb_cam",
"station_name": "data_gathering",
"camera_configs": {
"camera_1": {
"camera_id": "camera_1",
Expand Down
77 changes: 77 additions & 0 deletions edge_orchestrator/config/duck_detection_gcp_with_2_usbcamera.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"station_name": "duck_detection_gcp_with_2_usbcamera",
"camera_configs": {
"camera_1": {
"camera_id": "camera_1",
"camera_type": "usb",
"source_directory": "/dev/video0",
"position": "front",
"model_forwarder_config": {
"model_name": "duck_detection",
"model_type": "classification",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
},
"camera_2": {
"camera_id": "camera_2",
"camera_type": "usb",
"source_directory": "/dev/video2",
"position": "front",
"camera_resolution": {
"width": 1366,
"height": 768
},
"model_forwarder_config": {
"model_name": "duck_detection",
"model_type": "classification",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
}
},
"binary_storage_config": {
"storage_type": "gcp",
"bucket_name": "tf-vio-bucket"
},
"metadata_storage_config": {
"storage_type": "gcp",
"bucket_name": "tf-vio-bucket"
},
"item_rule_config": {
"item_rule_type": "min_threshold_ratio_rule",
"expected_decision": "OK",
"threshold": 1,
"recreate_me": false
}
}
Original file line number Diff line number Diff line change
@@ -1,53 +1,63 @@
{
"station_name": "marker_classif_with_2_fake_cam",
"station_name": "duck_detection_local_with_2_fakecamera",
"camera_configs": {
"camera_1": {
"camera_id": "camera_1",
"camera_type": "fake",
"source_directory": "fake_images/marker_images",
"source_directory": "fake_images/ducks",
"position": "front",
"model_forwarder_config": {
"model_name": "marker_quality_control",
"model_name": "duck_detection",
"model_type": "classification",
"model_serving_url": "http://edge_model_serving:8501/",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"OK",
"KO"
]
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK"
}
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
},
"camera_2": {
"camera_id": "camera_2",
"camera_id": "camera_1",
"camera_type": "fake",
"source_directory": "fake_images/marker_images",
"position": "back",
"source_directory": "fake_images/ducks",
"position": "front",
"camera_resolution": {
"width": 1366,
"height": 768
},
"model_forwarder_config": {
"model_name": "marker_quality_control",
"model_name": "duck_detection",
"model_type": "classification",
"model_serving_url": "http://edge_model_serving:8501/",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"OK",
"KO"
]
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK"
}
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
}
},
"binary_storage_config": {
Expand All @@ -61,6 +71,7 @@
"item_rule_config": {
"item_rule_type": "min_threshold_ratio_rule",
"expected_decision": "OK",
"threshold": 1
"threshold": 1,
"recreate_me": false
}
}
}
Original file line number Diff line number Diff line change
@@ -1,53 +1,63 @@
{
"station_name": "pin_detection_with_2_usb_cam",
"station_name": "duck_detection_local_with_2_usbcamera",
"camera_configs": {
"camera_1": {
"camera_id": "camera_1",
"camera_type": "usb",
"source_directory": "/dev/video0",
"position": "front",
"model_forwarder_config": {
"model_name": "pin_detection",
"model_name": "duck_detection",
"model_type": "classification",
"model_serving_url": "http://edge_model_serving:8501/",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"OK",
"KO"
]
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK"
}
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
},
"camera_2": {
"camera_id": "camera_2",
"camera_type": "usb",
"source_directory": "/dev/video4",
"position": "back",
"source_directory": "/dev/video2",
"position": "front",
"camera_resolution": {
"width": 1366,
"height": 768
},
"model_forwarder_config": {
"model_name": "pin_detection",
"model_name": "duck_detection",
"model_type": "classification",
"model_serving_url": "http://edge_model_serving:8501/",
"expected_image_resolution": {
"width": 224,
"height": 224
},
"model_version": "1",
"class_names": [
"OK",
"KO"
]
"KO",
"OK"
],
"model_serving_url": "http://edge_model_serving:8501/",
"recreate_me": false
},
"camera_rule_config": {
"camera_rule_type": "expected_label_rule",
"expected_class": "OK"
}
"expected_class": "OK",
"recreate_me": false
},
"recreate_me": false
}
},
"binary_storage_config": {
Expand All @@ -61,6 +71,7 @@
"item_rule_config": {
"item_rule_type": "min_threshold_ratio_rule",
"expected_decision": "OK",
"threshold": 1
"threshold": 1,
"recreate_me": false
}
}
Loading
Loading