refactor/fix: 优化运行时异常处理、调整 nncase 导入时机及修复 YOLO11/路径兼容性问题#4
Open
BlueDarkUP wants to merge 1 commit into
Open
Conversation
app.py: 1.原来在app.py中。设置了sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8'),为了及时捕获报错添加了write_through=True 2.对于模型的安装,发现问题:当设置模型为yolo11n,会显示安装但是无法安装成功,这是一个固件bug,考虑到YOLO11和YOLOv8 在目标检测上的网络输出结构、后处理算法都完全相同,所以85-93行将所有yolo11全部对应为yolov8n(建议之后修复这个固件问题) 3.由于c后端会由于无法解析python报错直接abord,所以添加了异常处理 4.PyQt的主线程异常导致0xC0000409强制退出,无法获取内部报错,在主程序中添加代码拦截主线程异常 confertor.py: 1.nncase的import时间不恰当,原来nncase在环境变量设置前就初始化,导致nncase无法使用原本在其初始化后才设置的环境变量 2.大型数据集进行校准数据量巨大,在gen函数中添加上限为100,因为校准并不需要大量的数据 3.如果yaml中包含./,会导致目录“.”被错误读取导致校准照片无法被成功读取,进行修复
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
app.py:
1.原来在app.py中。设置了sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8'),为了及时捕获报错添加了write_through=True
2.对于模型的安装,发现问题:当设置模型为yolo11n,会显示安装但是无法安装成功,这是一个固件bug,考虑到YOLO11和YOLOv8 在目标检测上的网络输出结构、后处理算法都完全相同,所以85-93行将所有yolo11全部对应为yolov8n(建议之后修复这个固件问题)
3.由于c后端会由于无法解析python报错直接abord,所以添加了异常处理
4.PyQt的主线程异常导致0xC0000409强制退出,无法获取内部报错,在主程序中添加代码拦截主线程异常
convertor.py:
1.nncase的import时间不恰当,原来nncase在环境变量设置前就初始化,导致nncase无法使用原本在其初始化后才设置的环境变量
2.大型数据集进行校准数据量巨大,在gen函数中添加上限为100,因为校准并不需要大量的数据
3.如果yaml中包含./,会导致目录“.”被错误读取导致校准照片无法被成功读取,进行修复