Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求助 #1

Open
HappyStupidChild opened this issue Jun 16, 2023 · 3 comments
Open

求助 #1

HappyStupidChild opened this issue Jun 16, 2023 · 3 comments

Comments

@HappyStupidChild
Copy link

你好,请问后端是怎么调用权重文件的?
我用本地yolov8训练的权重文件一直显示缓存失败是怎么回事啊,也没办法成功上传?

@datar5
Copy link
Owner

datar5 commented Jun 18, 2023

  1. 上传缓冲文件后端函数:
    @app.route('/upload/model/', methods=["POST"])
  2. 前端实现上传文件的业务逻辑:
    <el-form-item label="上传文件" label-width="150px">
  3. 上传表单的前端实现js函数:
    const handleModelPost = (form: any) => {
  4. 和上面上传模型表单的后端函数相关:
    app.add_url_rule('/wmodel/', defaults={'wid': None},
  5. 与之相关的wmodel类的添加函数实现逻辑:
    def post(self): # 添加数据

    实现yolov8训练权重文件逻辑步骤是依次是: 先将yolov8从前端发送请求到后端,后端从请求当中复制并缓存到一个文件里,前端将表单信息发送到后端。后端根据前端发来的表单信息,将之前缓存好的文件复制到专门存放模型pt文件的文件夹下,并且将表单的信息添加到数据库中
    后面ultralytics库一直在更新,本项目是基于3个月前的ultralytics库的内容进行搭建的

@HappyStupidChild
Copy link
Author

好的,多谢解惑,我再看看去。

@glory21
Copy link

glory21 commented Jul 14, 2023

好的,多谢解惑,我再看看去。

请问这个问题解决了吗?我也无法上传自己训练的模型

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants