修复人脸识别问题,更换facerknn,修复崩溃2
This commit is contained in:
parent
6d9b22517f
commit
f61b9d4c99
Binary file not shown.
@ -897,9 +897,7 @@ private:
|
||||
in.type = RKNN_TENSOR_UINT8;
|
||||
}
|
||||
|
||||
std::cerr << "[ai_face_recog] DEBUG: before InferBorrowed, in.size=" << in.size << " in.type=" << in.type << "\n";
|
||||
auto r = AiScheduler::Instance().InferBorrowed(model_handle_, in);
|
||||
std::cerr << "[ai_face_recog] DEBUG: after InferBorrowed, success=" << r.success << "\n";
|
||||
if (!r.success || r.outputs.empty()) {
|
||||
std::cerr << "[ai_face_recog] inference failed: " << (r.error.empty() ? "unknown" : r.error) << "\n";
|
||||
continue;
|
||||
|
||||
@ -401,17 +401,6 @@ AiScheduler::BorrowedInferResult AiScheduler::InferBorrowed(ModelHandle handle,
|
||||
return result;
|
||||
}
|
||||
|
||||
// DEBUG: 检查输出大小是否超出预分配 buffer
|
||||
for (uint32_t i = 0; i < ctx->n_output; ++i) {
|
||||
size_t prealloc_sz = ctx->output_buffers[i].size();
|
||||
size_t actual_sz = outputs[i].size;
|
||||
std::cerr << "[AiScheduler] output[" << i << "] prealloc=" << prealloc_sz
|
||||
<< " actual=" << actual_sz << " type=" << ctx->output_attrs[i].type << "\n";
|
||||
if (actual_sz > prealloc_sz && prealloc_sz > 0) {
|
||||
std::cerr << "[AiScheduler] ERROR: output size exceeds preallocated buffer!\n";
|
||||
}
|
||||
}
|
||||
|
||||
result.outputs.resize(ctx->n_output);
|
||||
for (uint32_t i = 0; i < ctx->n_output; ++i) {
|
||||
auto& out = result.outputs[i];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user