Merge pull request #383 from gwsystems/mt-dbf

Added "CNN Face Detection" app
master
Emil 1 year ago committed by GitHub
commit de22264f4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,7 @@ env:
# job control
jobs:
format:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Apt Update
run: sudo apt-get update
@ -24,7 +24,7 @@ jobs:
- name: Clang Format
run: ./format.sh -d
test:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Apt Update
run: sudo apt-get update

@ -26,6 +26,7 @@ all: \
gps_ekf.install \
license_plate_detection.install \
resize_image.install \
cnn_face_detection.install \
scratch_storage_get.install \
scratch_storage_set.install \
scratch_storage_delete.install \
@ -105,6 +106,9 @@ gps_ekf.install: ../runtime/bin/gps_ekf.wasm.so
.PHONY: license_plate_detection.install
license_plate_detection.install: ../runtime/bin/license_plate_detection.wasm.so
.PHONY: cnn_face_detection.install
cnn_face_detection.install: ../runtime/bin/cnn_face_detection.wasm.so
.PHONY: trap_divzero.install
trap_divzero.install: ../runtime/bin/trap_divzero.wasm.so

@ -1 +1 @@
Subproject commit 69c8b6116664d65a851cc459601bef6af3caeaea
Subproject commit f0b35e756395f79b06be8dd2660eecac94506e94

@ -14,13 +14,13 @@ debug:
.PHONY: client
client:
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: text/plain" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/airplane1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/automobile1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/bird1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/cat1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/deer1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/dog1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/frog1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/horse1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/ship1.bmp" "localhost:10000/rand"
@curl -H 'Expect:' -H "Content-Type: image/bmp" --data-binary "@../../../applications/wasm_apps/CMSIS_5_NN/images/bmp/truck1.bmp" "localhost:10000/rand"

@ -22,8 +22,7 @@
"relative-deadline-us": 10000,
"http-resp-content-type": "text/plain"
}
],
"extra-exec-percentile": 0
]
},
{
"name": "long-000",
@ -48,8 +47,7 @@
"relative-deadline-us": 18000,
"http-resp-content-type": "text/plain"
}
],
"extra-exec-percentile": 0
]
},
{
"name": "short-000",
@ -66,7 +64,6 @@
"relative-deadline-us": 18000,
"http-resp-content-type": "text/plain"
}
],
"extra-exec-percentile": 0
]
}
]

@ -0,0 +1,26 @@
RUNTIME_DIR=../../../runtime/
SLEDGE_BINARY_DIR=${RUNTIME_DIR}/bin
HOSTNAME=localhost
.PHONY: all
all: run
.PHONY: clean
clean:
rm -rf res/*
.PHONY: run
run:
LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} ${SLEDGE_BINARY_DIR}/sledgert spec.json
.PHONY: debug
debug:
SLEDGE_DISABLE_PREEMPTION=true SLEDGE_NWORKERS=1 LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert \
--eval-command="handle SIGUSR1 noprint nostop" \
--eval-command="handle SIGPIPE noprint nostop" \
--eval-command="set pagination off" \
--eval-command="run spec.json"
.PHONY: client
client:
curl -H 'Expect:' -H "Content-Type: image/jpeg" --data-binary "@cnn_faces.jpg" "${HOSTNAME}:10000/face"

@ -0,0 +1,5 @@
# CNN Face Detection
Originally, this workload returned an image where all the human faces were circles, along with the coordinates of the faces. It was modified to return a textual representation of faces, that is just the coordinates of the faces.
The scripts DO NOT check for functional correctness of output for this reason. Please look at other scripts to have a better example for new applications.

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 KiB

@ -0,0 +1,19 @@
[
{
"name": "gwu",
"port": 10000,
"replenishment-period-us": 0,
"max-budget-us": 0,
"reservation-percentile": 0,
"routes": [
{
"route": "/face",
"path": "cnn_face_detection.wasm.so",
"admissions-percentile": 50,
"expected-execution-us": 320000,
"relative-deadline-us": 500000,
"http-resp-content-type": "text/plain"
}
]
}
]

@ -18,4 +18,4 @@ debug:
--eval-command="run spec.json"
client:
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize"
curl -H 'Expect:' -H "Content-Type: image/jpeg" --data-binary "@flower.jpg" --output "result.jpg" "${HOSTNAME}:10000/resize"

Loading…
Cancel
Save