Distinguish visitor labels, metric values and explanatory notes
This commit is contained in:
parent
a1350ee60c
commit
c059a5a922
|
|
@ -1,5 +1,5 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.it_screen.edgevision" android:versionCode="10" android:versionName="0.3.5">
|
package="com.it_screen.edgevision" android:versionCode="11" android:versionName="0.3.6">
|
||||||
<uses-sdk android:minSdkVersion="30" android:targetSdkVersion="34"/>
|
<uses-sdk android:minSdkVersion="30" android:targetSdkVersion="34"/>
|
||||||
<uses-permission android:name="android.permission.CAMERA"/>
|
<uses-permission android:name="android.permission.CAMERA"/>
|
||||||
<uses-feature android:name="android.hardware.camera.any" android:required="true"/>
|
<uses-feature android:name="android.hardware.camera.any" android:required="true"/>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# EVAx10 Video analitics v0.3.5
|
# EVAx10 Video analitics v0.3.6
|
||||||
|
|
||||||
A separate native Android experiment for consenting adult volunteers.
|
A separate native Android experiment for consenting adult volunteers.
|
||||||
Package `com.it_screen.edgevision`. The existing FaceAPI baseline is
|
Package `com.it_screen.edgevision`. The existing FaceAPI baseline is
|
||||||
|
|
@ -10,10 +10,10 @@ installable as `com.it_screen.audiencepoc`.
|
||||||
`./build.sh` builds the ARM64, API 30+ APK with the Windows Android SDK 35
|
`./build.sh` builds the ARM64, API 30+ APK with the Windows Android SDK 35
|
||||||
and JDK 17 via WSL. The script pins and verifies the upstream Maven AAR.
|
and JDK 17 via WSL. The script pins and verifies the upstream Maven AAR.
|
||||||
Model assets load locally and are verified before ONNX Runtime session
|
Model assets load locally and are verified before ONNX Runtime session
|
||||||
creation. The signed test build is `build/EVAx10-Video-analitics-0.3.5.apk`.
|
creation. The signed test build is `build/EVAx10-Video-analitics-0.3.6.apk`.
|
||||||
|
|
||||||
```text
|
```text
|
||||||
adb install --no-incremental -r EVAx10-Video-analitics-0.3.5.apk
|
adb install --no-incremental -r EVAx10-Video-analitics-0.3.6.apk
|
||||||
adb shell am start -W -n com.it_screen.edgevision/.MainActivity
|
adb shell am start -W -n com.it_screen.edgevision/.MainActivity
|
||||||
adb logcat -s EdgeVision EdgeVisionBench
|
adb logcat -s EdgeVision EdgeVisionBench
|
||||||
```
|
```
|
||||||
|
|
|
||||||
4
build.sh
4
build.sh
|
|
@ -47,5 +47,5 @@ PY
|
||||||
if [[ ! -f build/poc-debug.p12 ]]; then
|
if [[ ! -f build/poc-debug.p12 ]]; then
|
||||||
"$jdk/bin/keytool.exe" -genkeypair -keystore build/poc-debug.p12 -storepass android -alias edgevision -keyalg RSA -keysize 2048 -validity 3650 -dname CN=EdgeVision
|
"$jdk/bin/keytool.exe" -genkeypair -keystore build/poc-debug.p12 -storepass android -alias edgevision -keyalg RSA -keysize 2048 -validity 3650 -dname CN=EdgeVision
|
||||||
fi
|
fi
|
||||||
"$jdk/bin/java.exe" -jar "$(wslpath -w "$tools/lib/apksigner.jar")" sign --ks build/poc-debug.p12 --ks-pass pass:android --out build/EVAx10-Video-analitics-0.3.5.apk build/aligned.apk
|
"$jdk/bin/java.exe" -jar "$(wslpath -w "$tools/lib/apksigner.jar")" sign --ks build/poc-debug.p12 --ks-pass pass:android --out build/EVAx10-Video-analitics-0.3.6.apk build/aligned.apk
|
||||||
"$jdk/bin/java.exe" -jar "$(wslpath -w "$tools/lib/apksigner.jar")" verify --verbose build/EVAx10-Video-analitics-0.3.5.apk
|
"$jdk/bin/java.exe" -jar "$(wslpath -w "$tools/lib/apksigner.jar")" verify --verbose build/EVAx10-Video-analitics-0.3.6.apk
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,12 @@ final class DiagnosticsPanel {
|
||||||
String display = value == null || value == JSONObject.NULL ? "N/A" : value + metric[2];
|
String display = value == null || value == JSONObject.NULL ? "N/A" : value + metric[2];
|
||||||
TextView row = values.get(metric[0]);
|
TextView row = values.get(metric[0]);
|
||||||
String label = metric[1] + " " + display;
|
String label = metric[1] + " " + display;
|
||||||
if (!label.contentEquals(row.getText())) row.setText(label);
|
if (!label.contentEquals(row.getText())) {
|
||||||
|
android.text.SpannableString styled = new android.text.SpannableString(label);
|
||||||
|
styled.setSpan(new android.text.style.ForegroundColorSpan(0xff9ce8c2),
|
||||||
|
label.length() - display.length(), label.length(), android.text.Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
|
row.setText(styled);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (demographicView != null && !demographicsText.contentEquals(demographicView.getText()))
|
if (demographicView != null && !demographicsText.contentEquals(demographicView.getText()))
|
||||||
demographicView.setText(demographicsText);
|
demographicView.setText(demographicsText);
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public final class MainActivity extends Activity {
|
||||||
private long metricsEpoch, frameCount, lastCpu, lastCpuAt, errors;
|
private long metricsEpoch, frameCount, lastCpu, lastCpuAt, errors;
|
||||||
private double aiFps;
|
private double aiFps;
|
||||||
private double loadMs;
|
private double loadMs;
|
||||||
private TextView status, stats, trackingLog;
|
private TextView status, currentVisitorValue, trackingLog;
|
||||||
private DiagnosticsPanel diagnostics;
|
private DiagnosticsPanel diagnostics;
|
||||||
private final java.text.SimpleDateFormat eventClock = new java.text.SimpleDateFormat("HH:mm:ss", Locale.ROOT);
|
private final java.text.SimpleDateFormat eventClock = new java.text.SimpleDateFormat("HH:mm:ss", Locale.ROOT);
|
||||||
private Preview preview;
|
private Preview preview;
|
||||||
|
|
@ -172,9 +172,21 @@ public final class MainActivity extends Activity {
|
||||||
right.setBackgroundColor(0xff1a2833);
|
right.setBackgroundColor(0xff1a2833);
|
||||||
right.setPadding(14, 10, 12, 10);
|
right.setPadding(14, 10, 12, 10);
|
||||||
root.addView(right, new LinearLayout.LayoutParams(0, -1, 1));
|
root.addView(right, new LinearLayout.LayoutParams(0, -1, 1));
|
||||||
stats = text("", 14);
|
|
||||||
diagnostics = new DiagnosticsPanel(this);
|
diagnostics = new DiagnosticsPanel(this);
|
||||||
right.addView(stats);
|
LinearLayout currentVisitorRow = new LinearLayout(this);
|
||||||
|
currentVisitorRow.setGravity(Gravity.CENTER_VERTICAL);
|
||||||
|
TextView currentVisitorLabel = text("Current visitors", 16);
|
||||||
|
currentVisitorLabel.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
|
currentVisitorRow.addView(currentVisitorLabel, new LinearLayout.LayoutParams(0, -2, 1));
|
||||||
|
currentVisitorValue = text("0", 32);
|
||||||
|
currentVisitorValue.setTextColor(0xff9ce8c2);
|
||||||
|
currentVisitorValue.setTypeface(Typeface.DEFAULT_BOLD);
|
||||||
|
currentVisitorRow.addView(currentVisitorValue);
|
||||||
|
right.addView(currentVisitorRow);
|
||||||
|
TextView currentVisitorNote = text("Оценка числа людей, которых камера сейчас видит.", 13);
|
||||||
|
currentVisitorNote.setTextColor(0xffaebfd1);
|
||||||
|
currentVisitorNote.setPadding(0, 4, 0, 6);
|
||||||
|
right.addView(currentVisitorNote);
|
||||||
TextView unique = text("Уникальные посетители — пока не считаются", 14);
|
TextView unique = text("Уникальные посетители — пока не считаются", 14);
|
||||||
unique.setPadding(0, 10, 0, 0);
|
unique.setPadding(0, 10, 0, 0);
|
||||||
right.addView(unique);
|
right.addView(unique);
|
||||||
|
|
@ -589,9 +601,8 @@ public final class MainActivity extends Activity {
|
||||||
private static double round(double value) { return Math.round(value * 10) / 10.0; }
|
private static double round(double value) { return Math.round(value * 10) / 10.0; }
|
||||||
|
|
||||||
private void updateStats(int current, int visits, int[] genders, int[] ages) {
|
private void updateStats(int current, int visits, int[] genders, int[] ages) {
|
||||||
String currentLabel = "Current visitors " + current +
|
String value = Integer.toString(current);
|
||||||
"\nОценка числа людей, которых камера сейчас видит.";
|
if (!value.contentEquals(currentVisitorValue.getText())) currentVisitorValue.setText(value);
|
||||||
if (!currentLabel.contentEquals(stats.getText())) stats.setText(currentLabel);
|
|
||||||
diagnostics.updateConfirmedTracks(visits, genders, ages);
|
diagnostics.updateConfirmedTracks(visits, genders, ages);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue