# lixin-detect **Repository Path**: timor007/lixin-detect ## Basic Information - **Project Name**: lixin-detect - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-07-30 - **Last Updated**: 2025-07-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 项目介绍 该项目是一个基于python的目标检测项目,使用的是yolov11模型。 ## 项目结构 ## 项目依赖 python version = 3.12.10 ## 项目运行 ### 模型训练 需要使用yolov11模型进行训练,训练数据需要标注好。 ```bash python train_lixin.py ``` ### web项目配置与运行 项目配置,需要修改web-app-new.py文件,注册训练好的模型,参考代码如下: ```python # 初始化模型服务 model_service = ModelService() # 四种缺陷一起检测 model_service.register_model("lixin-front", YOLOModelWrapper(model_path="runs/detect/train4/weights/best.onnx", preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024), postprocessor=YOLOPostprocessorWithClass())) # 四种缺陷分开单独检测(单独的模型) mutilate_model_wrapper = MutilateModelWrapper(model_configs={}, preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024)) # 起泡 mutilate_model_wrapper.addModels("bubble", YOLOModelWrapper(model_path="runs/detect/train1/weights/best.onnx", preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024)), ["缺角"]) # 缺角 mutilate_model_wrapper.addModels("chipping", YOLOModelWrapper(model_path="runs/detect/train2/weights/best.onnx", preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024)), ["缺角"]) # 裂缝 mutilate_model_wrapper.addModels("crack", YOLOModelWrapper(model_path="runs/detect/train3/weights/best.onnx", preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024)), ["缺角"]) # 砂眼 mutilate_model_wrapper.addModels("pit", YOLOModelWrapper(model_path="runs/detect/train4/weights/best.onnx", preprocessor=YOLOPreprocessor(target_width=1280, target_height=1024)), ["缺角"]) model_service.register_model("lixin-front-new", mutilate_model_wrapper) ``` 运行项目: ```bash python web-app-new.py ``` ### 项目测试 浏览器访问:http://localhost:5000/ ## 项目截图 ![Detection Results](webapp/defect.xpman.local_lixin-detect.html.png) ## 其他 暂无