Mild命名统一 + encoder_thread防饿死 + AGENTS.md重写
This commit is contained in:
+5
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* YOLO_Mega_Mild_r2 C++ inference engine v3
|
||||
* Mild Mega r2 C++ inference engine v3 (基于魔改YOLO架构)
|
||||
* Architecture: 3-9-9-13-13-19-19-19-44-44-64-64 -> head(64-64,dw) -> out(64-9)
|
||||
*/
|
||||
#include "model_v10.hpp"
|
||||
@@ -395,9 +395,9 @@ static void resize_bilinear_hwc3(const uint8_t* src, int sw, int sh, uint8_t* ds
|
||||
}
|
||||
}
|
||||
|
||||
static void preproc_160(const uint8_t* img, YoloPixFmt fmt) {
|
||||
static void preproc_160(const uint8_t* img, MildPixFmt fmt) {
|
||||
for (int c = 0; c < 3; ++c) {
|
||||
const int sc = (fmt == YOLO_FMT_BGR) ? (2 - c) : c;
|
||||
const int sc = (fmt == MILD_FMT_BGR) ? (2 - c) : c;
|
||||
float* ch = g_preproc + c * IN_H * IN_W;
|
||||
for (int y = 0; y < IN_H; ++y) {
|
||||
const uint8_t* row = img + y * IN_W * 3;
|
||||
@@ -452,7 +452,7 @@ bool model_v10_init(const char* path) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int model_v10_detect_fmt(const uint8_t* img, int w, int h, YoloPixFmt fmt,
|
||||
int model_v10_detect_fmt(const uint8_t* img, int w, int h, MildPixFmt fmt,
|
||||
DetectBoxV10* boxes, int max_boxes, float thr) {
|
||||
if (!g_rdy || !img || !boxes || max_boxes <= 0 || w <= 1 || h <= 1) return 0;
|
||||
|
||||
@@ -476,7 +476,7 @@ int model_v10_detect_fmt(const uint8_t* img, int w, int h, YoloPixFmt fmt,
|
||||
|
||||
int model_v10_detect(const uint8_t* img, int w, int h, DetectBoxV10* boxes, int max_boxes, const float* thresh) {
|
||||
float thr = thresh ? thresh[0] : 0.6f;
|
||||
return model_v10_detect_fmt(img, w, h, YOLO_FMT_BGR, boxes, max_boxes, thr);
|
||||
return model_v10_detect_fmt(img, w, h, MILD_FMT_BGR, boxes, max_boxes, thr);
|
||||
}
|
||||
|
||||
const float* model_v10_forward_debug(const float* chw) {
|
||||
|
||||
Reference in New Issue
Block a user