修复人脸检车,最新
This commit is contained in:
parent
7b0171f48a
commit
8bb5b51574
@ -24,8 +24,8 @@
|
||||
"type": "preprocess",
|
||||
"role": "filter",
|
||||
"enable": true,
|
||||
"dst_w": 640,
|
||||
"dst_h": 640,
|
||||
"dst_w": 320,
|
||||
"dst_h": 320,
|
||||
"dst_format": "rgb",
|
||||
"keep_ratio": false,
|
||||
"use_rga": true
|
||||
|
||||
Binary file not shown.
@ -165,12 +165,14 @@ bool ExtractNc(const Tensor& t, int c, NcTensor& out) {
|
||||
// Common: [1, C, N] or [1, N, C]
|
||||
const uint32_t d1 = t.dims[1];
|
||||
const uint32_t d2 = t.dims[2];
|
||||
if (static_cast<int>(d1) == c) {
|
||||
n = static_cast<int>(d2);
|
||||
transposed = true; // CxN
|
||||
} else if (static_cast<int>(d2) == c) {
|
||||
if (static_cast<int>(d2) == c) {
|
||||
n = static_cast<int>(d1);
|
||||
transposed = false; // NxC
|
||||
} else if (static_cast<int>(d1) == c) {
|
||||
n = static_cast<int>(d2);
|
||||
transposed = true; // CxN
|
||||
} else {
|
||||
return false; // 明确拒绝,不 fallback
|
||||
}
|
||||
} else if (t.dims.size() == 2) {
|
||||
// [N, C] or [C, N]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user