debug_fix_screen_change #2
@@ -67,6 +67,9 @@ class FaceLandmarkerHelper(
|
||||
}
|
||||
}
|
||||
|
||||
minFaceDetectionConfidence = 0.1f;
|
||||
minFaceTrackingConfidence = 0.1f;
|
||||
minFacePresenceConfidence = 0.1f;
|
||||
try {
|
||||
val baseOptions = baseOptionBuilder.build()
|
||||
// Create an option builder with base options and specific
|
||||
@@ -238,32 +241,33 @@ class FaceLandmarkerHelper(
|
||||
val frameId = result.timestampMs()
|
||||
if( result.faceLandmarks().size > 0 ) {
|
||||
// 计算各种延时
|
||||
val timings = frameTimings[frameId]
|
||||
if (timings != null) {
|
||||
val totalLatency = resultTime - timings.captureTime
|
||||
val preprocessLatency = timings.preprocessEndTime - timings.preprocessStartTime
|
||||
val detectionLatency = resultTime - timings.detectionStartTime
|
||||
val captureToDetectionLatency = timings.detectionStartTime - timings.captureTime
|
||||
|
||||
Log.i("TimeLatency",
|
||||
"总延时: ${totalLatency}ms | " +
|
||||
"预处理: ${preprocessLatency}ms | " +
|
||||
"检测: ${detectionLatency}ms | " +
|
||||
"捕获到检测: ${captureToDetectionLatency}ms | " +
|
||||
"FPS: ${String.format("%.1f", currentFps)}"
|
||||
)
|
||||
|
||||
val finishTimeMs = SystemClock.uptimeMillis()
|
||||
val inferenceTime = finishTimeMs - result.timestampMs()
|
||||
faceLandmarkerHelperListener?.onResults(
|
||||
ResultBundle(
|
||||
result,
|
||||
inferenceTime, // 主要是检测时间
|
||||
input.height,
|
||||
input.width,
|
||||
)
|
||||
)
|
||||
} else {
|
||||
// val timings = frameTimings[frameId]
|
||||
// if (timings != null) {
|
||||
// val totalLatency = resultTime - timings.captureTime
|
||||
// val preprocessLatency = timings.preprocessEndTime - timings.preprocessStartTime
|
||||
// val detectionLatency = resultTime - timings.detectionStartTime
|
||||
// val captureToDetectionLatency = timings.detectionStartTime - timings.captureTime
|
||||
//
|
||||
// Log.i("TimeLatency",
|
||||
// "总延时: ${totalLatency}ms | " +
|
||||
// "预处理: ${preprocessLatency}ms | " +
|
||||
// "检测: ${detectionLatency}ms | " +
|
||||
// "捕获到检测: ${captureToDetectionLatency}ms | " +
|
||||
// "FPS: ${String.format("%.1f", currentFps)}"
|
||||
// )
|
||||
//
|
||||
// val finishTimeMs = SystemClock.uptimeMillis()
|
||||
// val inferenceTime = finishTimeMs - result.timestampMs()
|
||||
// faceLandmarkerHelperListener?.onResults(
|
||||
// ResultBundle(
|
||||
// result,
|
||||
// inferenceTime, // 主要是检测时间
|
||||
// input.height,
|
||||
// input.width,
|
||||
// )
|
||||
// )
|
||||
// } else
|
||||
//{
|
||||
val finishTimeMs = SystemClock.uptimeMillis()
|
||||
val inferenceTime = finishTimeMs - result.timestampMs()
|
||||
Log.i("TimeLatency",
|
||||
@@ -277,7 +281,7 @@ class FaceLandmarkerHelper(
|
||||
input.width
|
||||
)
|
||||
)
|
||||
}
|
||||
//}
|
||||
}
|
||||
else {
|
||||
faceLandmarkerHelperListener?.onEmpty()
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ private:
|
||||
VkPipelineLayout m_pipelineLayout = VK_NULL_HANDLE;
|
||||
VkDescriptorSetLayout m_descriptorSetLayout = VK_NULL_HANDLE;
|
||||
vector<VkDescriptorSet> m_descriptor_sets;
|
||||
const uint32_t kMaxTexture = 30;
|
||||
const uint32_t kMaxTexture = 60;
|
||||
vector<Texture> m_texs;
|
||||
vector<Texture> m_texs_next;
|
||||
vector<Texture> m_texs_ex;
|
||||
|
||||
Reference in New Issue
Block a user