Skip to content

Commit

Permalink
wip pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptiste O'Jeanson committed Aug 11, 2023
1 parent 7ff8d49 commit b49ccae
Show file tree
Hide file tree
Showing 51 changed files with 592 additions and 608 deletions.
2 changes: 0 additions & 2 deletions docs/edge_orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ Inside this folder should be the .tflite model and if needed a .txt file with th
"your_new_model_name": {
"category": "classification",
"version": 1,
"pb_file_path": "modelforward/your_new_model_name",
"class_names": [
"class name 1",
"class name 2",
Expand All @@ -230,7 +229,6 @@ Inside this folder should be the .tflite model and if needed a .txt file with th
"your_new_model_name": {
"category": "object_detection",
"version": 1,
"pb_file_path": "modelforward/your_new_model_name",
"class_names_path": "{name of file with the class names}.txt",
"output": {
"boxes_coordinates": "{name of the boxes_coordinates variable in your model}",
Expand Down
Empty file.
65 changes: 65 additions & 0 deletions edge_orchestrator/config/.active_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"infra": {
"binary_storage": {
"type": "filesystem",
"params": {
"src_directory": "/tmp/vio/edge_orchestrator/data/storage"
}
},
"metadata_storage": {
"type": "filesystem"
},
"mode1_forward": {
"type": "fake"
},
"telemetry_sink": {
"type": "fake"
},
"cameras": [
{
"name": "camera_#1",
"type": "fake",
"source": "marker_images",
"position": "back",
"exposition": 100
}
]
},
"domain": {
"camera_rules": [
{
"name": "camera_#1",
"models_graph": [
{
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
],
"rule": {
"name": "expected_label_rule",
"parameters": {
"expected_label": [
"OK"
]
}
}
}
],
"item_rule": {
"name": "min_threshold_KO_rule",
"params": {
"threshold": 1
}
}
}
}
21 changes: 7 additions & 14 deletions edge_orchestrator/config/inventory.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,15 @@
"models": {
"inception": {
"category": "classification",
"version": 1,
"pb_file_path": "modelforward/inception",
"version": "1",
"image_resolution": [
224,
224
]
},
"marker_quality_control": {
"category": "classification",
"version": 1,
"pb_file_path": "modelforward/marker_quality_control",
"version": "1",
"class_names": [
"OK",
"KO"
Expand All @@ -51,8 +49,7 @@
},
"mask_classification_model": {
"category": "classification",
"version": 1,
"pb_file_path": "modelforward/mask_classification_model",
"version": "1",
"class_names": [
"OK",
"KO"
Expand All @@ -64,8 +61,7 @@
},
"mobilenet_v1_640x640": {
"category": "object_detection",
"version": 1,
"pb_file_path": "modelforward/mobilenet_v1_640x640",
"version": "1",
"class_names_path": "coco_labels_originals.txt",
"output": {
"boxes_coordinates": "detection_boxes",
Expand All @@ -81,8 +77,7 @@
},
"mobilenet_ssd_v2_coco": {
"category": "object_detection",
"version": 1,
"pb_file_path": "modelforward/mobilenet_ssd_v2_coco",
"version": "1",
"class_names_path": "coco_labels_originals.txt",
"output": {
"boxes_coordinates": "detection_boxes",
Expand All @@ -97,8 +92,7 @@
},
"mobilenet_ssd_v2_face": {
"category": "object_detection",
"version": 1,
"pb_file_path": "modelforward/mobilenet_ssd_v2_face",
"version": "1",
"class_names_path": "face_labels.txt",
"output": {
"boxes_coordinates": "detection_boxes",
Expand All @@ -113,8 +107,7 @@
},
"cellphone_connection_control": {
"category": "classification",
"version": 1,
"pb_file_path": "modelforward/cellphone_connection_control",
"version": "1",
"class_names": [
"unconnected",
"connected"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,45 +1,63 @@
{
"binary_storage": {
"type": "filesystem",
"params": {
"src_directory": "/tmp/vio/edge_orchestrator/data/storage"
"infra": {
"binary_storage": {
"type": "filesystem",
"params": {
"src_directory": "/tmp/vio/edge_orchestrator/data/storage"
}
},
"metadata_storage": {
"type": "filesystem"
},
"model_forward": {
"type": "fake"
},
"telemetry_sink": {
"type": "fake"
},
"cameras": {
"camera_#1": {
"type": "fake",
"source": "marker_images",
"position": "back",
"exposition": 100
}
}
},
"metadata_storage": {
"type": "filesystem"
},
"model_forward": {
"type": "fake"
},
"telemetry_sink": {
"type": "fake"
},
"cameras": {
"camera_#1": {
"type": "fake",
"source": "marker_images",
"position": "back",
"exposition": 100,
"models_graph": {
"model_#4": {
"metadata": "marker_quality_control",
"depends_on": []
}
},
"camera_rule": {
"name": "expected_label_rule",
"parameters": {
"expected_label": [
"OK"
]
"domain": {
"cameras": {
"camera_#1": {
"models_graph": {
"model_#4": {
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
},
"camera_rule": {
"name": "expected_label_rule",
"parameters": {
"expected_label": [
"OK"
]
}
}
}
}
},
"item_rule": {
"name": "min_threshold_KO_rule",
"parameters": {
"threshold": 1
},
"item_rule": {
"name": "min_threshold_KO_rule",
"parameters": {
"threshold": 1
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
{
"cameras": {
"camera_id3": {
"camera_#3": {
"type": "pi_camera",
"position": "front",
"exposition": 100,
"models_graph": {
"model_id4": {
"metadata": "marker_quality_control",
"model_#4": {
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
},
"camera_rule": {
"name": "expected_label_rule",
"parameters": {
"expected_label": ["OK"]
"expected_label": [
"OK"
]
}
}
}
Expand All @@ -24,4 +36,4 @@
"threshold": 1
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
{
"cameras": {
"camera_id3": {
"camera_#3": {
"type": "usb_camera",
"position": "front",
"exposition": 100,
"source": "/dev/video0",
"models_graph": {
"model_id4": {
"metadata": "marker_quality_control",
"model_#4": {
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
},
"camera_rule": {
"name": "expected_label_rule",
"parameters": {
"expected_label": ["OK"]
"expected_label": [
"OK"
]
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,18 @@
"position": "back",
"exposition": 100,
"models_graph": {
"model_id4": {
"metadata": "marker_quality_control",
"model_#4": {
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
},
Expand All @@ -41,8 +51,18 @@
"position": "back",
"exposition": 100,
"models_graph": {
"model_id4": {
"metadata": "marker_quality_control",
"model_#4": {
"name": "marker_quality_control",
"category": "classification",
"version": "1",
"class_names": [
"OK",
"KO"
],
"image_resolution": [
224,
224
],
"depends_on": []
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"cameras": {
"camera_id3": {
"camera_#3": {
"type": "fake",
"source": "people_dataset",
"position": "front",
"exposition": 100,
"models_graph": {
"model_id5": {
"metadata": "mobilenet_ssd_v2_coco",
"model_#5": {
"name": "mobilenet_ssd_v2_coco",
"depends_on": [],
"class_to_detect": ["person"]
}
Expand Down
Loading

0 comments on commit b49ccae

Please sign in to comment.