bytesc / Image_Recognition_WebGUI

✨基于 3D 卷积神经网络(CNN)的阿尔兹海默智能诊断 Web 应用 Alzheimer's Intelligent Diagnosis Web Application based on 3D Convolutional Neural Network and the ADNI Dataset ✨ (with README in English) 🚩:图像识别可视化界面,快速部署深度学习模型为网页应用,Web预测系统,决策支持系统(DSS),图像识别前端网页,图像识别Demo展示-Pywebio。AI人工智能图像识别-Pytorch;nii医学影像处理;ADNI数据集。100%纯Python代码,轻量化,易复现
http://www.bytesc.top
MIT License
89 stars 7 forks source link

上传图像失败 #5

Closed alalert closed 6 months ago

alalert commented 6 months ago

各种环境已经按照requirement安装好了(tqdm库我是下载的 4.66.1版本),仍无法解决图像上传问题, image

bytesc commented 6 months ago

1, 你上传的 .nii 图像在我部署的线上环境和你本地是否都上传失败。 2, 如果是你本地环境报错,请给出具体的报错信息。

alalert commented 6 months ago

我通过debug查找,发现在 with open(temp_file_path, 'wb') as file: 这一句报错跳入到except异常处理,然后refresh()又进入代码开始处,所以一直没办法进入到后续识别分类中

        if is_demo is False:   #上传.nii图像             try:                 inpic = pywebio.input.file_upload(label="上传医学影像(.nii)")                 inpic = BytesIO(inpic['content'])

                temp_file_path = "./nii/" + generate_random_str() + ".nii"                    with open(temp_file_path, 'wb') as file:      #此句运行后跳到except中了                     file.write(inpic.getvalue())  # 保存到本地                 print_logs("upload_file," + temp_file_path + ",\n", user_ip)  

            except :                     pywebio.output.toast("输入错误,请上传医学影像文件(.nii)", color="warn")                 refresh()

------------------ 原始邮件 ------------------ 发件人: "bytesc/Image_Recognition_WebGUI" @.>; 发送时间: 2024年2月21日(星期三) 下午5:00 @.>; 抄送: "20级通信工程 @.**@.>; 主题: Re: [bytesc/Image_Recognition_WebGUI] 上传图像失败 (Issue #5)

1, 你上传的 .nii 图像在我部署的线上环境和你本地是否都上传失败。 2, 如果是你本地环境报错,请给出具体的报错信息。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

bytesc commented 6 months ago

你的路径下是否存在,./nii/这个文件夹,没有就新建一个空的。