chore: additional resize by resolution debugging

main
Sean McBride 4 years ago
parent a904164f88
commit 5f2804939c

@ -156,9 +156,9 @@ jobs:
run: |
./test.sh image_resize
if: success() || failure()
- name: License Plate Detection by Resolution
- name: Image Resize by Resolution
run: |
./test.sh lpd_by_resolution
./test.sh image_resize_by_resolution
if: success() || failure()
- name: License Plate Detection by Plate Count
run: |

@ -12,7 +12,7 @@ log="$experiment_directory/log.csv"
if [ "$1" != "-d" ]; then
SLEDGE_SANDBOX_PERF_LOG=$log PATH="$binary_directory:$PATH" LD_LIBRARY_PATH="$binary_directory:$LD_LIBRARY_PATH" sledgert "$experiment_directory/spec.json" &
sleep 2
sleep 3
else
echo "Running under gdb"
fi
@ -24,31 +24,43 @@ for ((i = 0; i < total_count; i++)); do
echo "$i"
ext="$RANDOM"
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_small.jpg" --output "result_${ext}_small.png" localhost:10000
pixel_differences="$(compare -identify -metric AE "result_${ext}_small.png" expected_result_small.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Small FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
# Small
if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_small.jpg" --output "result_${ext}_small.png" localhost:10000; then
pixel_differences="$(compare -identify -metric AE "result_${ext}_small.png" expected_result_small.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Small FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
fi
else
echo "curl failed with $?"
fi
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_medium.jpg" --output "result_${ext}_medium.png" localhost:10001
pixel_differences="$(compare -identify -metric AE "result_${ext}_medium.png" expected_result_medium.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Small FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
# Medium
if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_medium.jpg" --output "result_${ext}_medium.png" localhost:10001; then
pixel_differences="$(compare -identify -metric AE "result_${ext}_medium.png" expected_result_medium.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Medium FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
fi
else
echo "curl failed with $?"
fi
curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_large.jpg" --output "result_${ext}_large.png" localhost:10002
pixel_differences="$(compare -identify -metric AE "result_${ext}_large.png" expected_result_large.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Small FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
# Large
if curl -H 'Expect:' -H "Content-Type: image/jpg" --data-binary "@shrinking_man_large.jpg" --output "result_${ext}_large.png" localhost:10002; then
pixel_differences="$(compare -identify -metric AE "result_${ext}_large.png" expected_result_large.png null: 2>&1 > /dev/null)"
echo "Pixel Differences: $pixel_differences"
if [[ "$pixel_differences" != "0" ]]; then
echo "Large FAIL"
echo "$pixel_differences pixel differences detected"
exit 1
fi
else
echo "curl failed with $?"
fi
success_count=$((success_count + 1))

@ -20,7 +20,7 @@ declare -ra tests=(
ekf_one_iteration
image_classification
image_resize
lpd_by_resolution
image_resize_by_resolution
lpd_by_plate_count
bimodal
concurrency
@ -139,13 +139,13 @@ image_resize() {
return 0
}
lpd_by_resolution() {
if [[ ! -f "$base_dir/runtime/bin/lpd_wasm.so" ]]; then
image_resize_by_resolution() {
if [[ ! -f "$base_dir/runtime/bin/resize_wasm.so" ]]; then
make sod -C "$base_dir/runtime/tests" || exit 1
fi
pushd "$base_dir/runtime/experiments/applications/imageresize/by_resolution" || exit 1
./install.sh || exit 1
./run.sh || failed_tests+=("lpd_by_resolution")
./run.sh || failed_tests+=("image_resize_resolution")
popd || exit 1
return 0
}

Loading…
Cancel
Save