Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,13 @@ description = "Build the har1 workflow WASM module"
dir = "services/ws-modules/har1"
run = "wasm-pack build . --target web"

[tasks.build-ws-face-detection-module]
description = "Build the face detection workflow WASM module"
dir = "services/ws-modules/face-detection"
run = "wasm-pack build . --target web"

[tasks.build]
depends = ["build-ws-har1-module", "build-ws-wasm-agent"]
depends = ["build-ws-face-detection-module", "build-ws-har1-module", "build-ws-wasm-agent"]
description = "Build all WebAssembly modules"

[tasks.test-ws-wasm-agent-firefox]
Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
[workspace]
members = ["libs/edge-toolkit", "services/ws-modules/har1", "services/ws-server", "services/ws-wasm-agent"]
members = [
"libs/edge-toolkit",
"services/ws-modules/face-detection",
"services/ws-modules/har1",
"services/ws-server",
"services/ws-wasm-agent",
]
resolver = "2"

[workspace.dependencies]
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ and save it as `services/ws-server/static/models/human_activity_recognition.onnx

### Face detection setup

Download the onnx from https://huggingface.co/amd/retinaface and save it in
`services/ws-server/static/models/` and rename the file to `video_cv.onnx`.
1. Download RetinaFace_int.onnx from https://huggingface.co/amd/retinaface/tree/main/weights
2. Save it in `services/ws-server/static/models/`
3. Rename the file to `video_cv.onnx`.

### Build and run the agent

```bash
mise run build-ws-wasm-agent
mise run build-ws-har1-module
mise run build-ws-face-detection-module
mise run ws-server
```

Expand All @@ -46,7 +48,7 @@ Then on your phone, open Chrome and type in https://192.168.1.x:8433/

Click "har demo".

For webcam inference, click "Load video CV model" and then "Start video".
For webcam inference, click "face demo".

## Grant

Expand Down
31 changes: 31 additions & 0 deletions services/ws-modules/face-detection/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[package]
name = "et-ws-face-detection"
version = "0.1.0"
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
et-ws-wasm-agent = { path = "../../ws-wasm-agent" }
js-sys = "0.3"
serde.workspace = true
serde_json.workspace = true
tracing.workspace = true
tracing-wasm = "0.2"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
"BinaryType",
"Document",
"Event",
"EventTarget",
"MessageEvent",
"Storage",
"WebSocket",
"Window",
"console",
] }

[dev-dependencies]
wasm-bindgen-test = "0.3"
Loading
Loading