Boen_Shi b054769b40 feat(model): 添加YOLO Detect模型支持并移除预处理功能
- 新增yolo_detect模块,包含backbone、nets、utils等组件
- 在模型配置中添加yolo_detect选项,支持新的检测模型
- 移除SAM3预处理相关代码和配置项
- 更新Dockerfile删除core目录下所有文件以减少镜像体积
- 修改worker服务移除图像标签预处理逻辑,直接进行模型检测
2026-01-27 15:00:27 +08:00

21 lines
668 B
Python

from app.core.segformer.detect import Detection as SegFormer, DetectionMock as SegFormerMock
from app.core.yolo.detect import YOLOSeg
from app.core.yolo_detect.detect import YOLODetect
class Model:
def __init__(self):
from app.main import MODEL
if MODEL == "segformer":
print("使用 SegFormer 模型")
self.detection = SegFormer()
elif MODEL == "yolo":
print("使用 YOLO 模型")
self.detection = YOLOSeg()
elif MODEL == "yolo_detect":
print("使用 YOLO_Detect 模型")
self.detection = YOLODetect()
def getModel(self):
return self.detection